diff options
Diffstat (limited to '')
-rw-r--r-- | toolkit/components/passwordmgr/test/mochitest/formless_basic_shadow_DOM_each_field_in_its_own_shadow_root.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/toolkit/components/passwordmgr/test/mochitest/formless_basic_shadow_DOM_each_field_in_its_own_shadow_root.html b/toolkit/components/passwordmgr/test/mochitest/formless_basic_shadow_DOM_each_field_in_its_own_shadow_root.html new file mode 100644 index 0000000000..b0ea0dc486 --- /dev/null +++ b/toolkit/components/passwordmgr/test/mochitest/formless_basic_shadow_DOM_each_field_in_its_own_shadow_root.html @@ -0,0 +1,28 @@ +<!DOCTYPE html><html><head><meta charset="utf-8"></head><body> +<!-- Any copyright is dedicated to the Public Domain. + - http://creativecommons.org/publicdomain/zero/1.0/ --> + +<!-- Simple form with username and password fields each in their own shadow root --> +<!-- This form is based off of toolkit/components/passwordmgr/test/browser/formless_basic.html --> +<!-- username and password inputs generated programmatically below --> +<input id="submit" type="submit"> + +<script> + const submitButton = document.getElementById("submit"); + const fields = ["username", "password"]; + for (let field of fields) { + const inputEle = document.createElement("input"); + inputEle.id = field; + inputEle.name = field; + if (field === "password") { + inputEle.type = field; + } + const wrapper = document.createElement("span"); + wrapper.id = `wrapper-${field}`; + const shadow = wrapper.attachShadow({mode: "closed"}); + shadow.append(inputEle); + submitButton.before(wrapper); + } +</script> + +</body></html> |