trisquel-icecat/icecat/layout/reftests/forms/textarea/autofill-author-background.html
2025-10-06 02:35:48 -06:00

9 lines
599 B
HTML

<!doctype html>
<textarea style="resize: none; background-color: red; background-image: linear-gradient(red, blue);"></textarea>
<script>
let textarea = SpecialPowers.wrap(document.querySelector("textarea"));
SpecialPowers.Cc["@mozilla.org/satchel/form-fill-controller;1"].getService(SpecialPowers.Ci.nsIFormFillController).markAsAutoCompletableField(textarea);
textarea.getBoundingClientRect(); // previewValue setter depends on the reframe posted by markAsAutoCompletableField() having being processed...
textarea.previewValue = "Autofill";
textarea.autofillState = "preview";
</script>