autofill-author-background.html (563B)
1 <!doctype html> 2 <input type=text style="background-color: red; background-image: linear-gradient(red, blue);"> 3 <script> 4 let input = SpecialPowers.wrap(document.querySelector("input")); 5 SpecialPowers.Cc["@mozilla.org/satchel/form-fill-controller;1"].getService(SpecialPowers.Ci.nsIFormFillController).markAsAutoCompletableField(input); 6 input.getBoundingClientRect(); // previewValue setter depends on the reframe posted by markAsAutoCompletableField() having being processed... 7 input.previewValue = "Autofill"; 8 input.autofillState = "preview"; 9 </script>