diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /mobile/android/geckoview/src/androidTest/assets/www/inputs.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/geckoview/src/androidTest/assets/www/inputs.html')
-rw-r--r-- | mobile/android/geckoview/src/androidTest/assets/www/inputs.html | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/mobile/android/geckoview/src/androidTest/assets/www/inputs.html b/mobile/android/geckoview/src/androidTest/assets/www/inputs.html new file mode 100644 index 0000000000..554c6c8143 --- /dev/null +++ b/mobile/android/geckoview/src/androidTest/assets/www/inputs.html @@ -0,0 +1,66 @@ +<html> + <head> + <meta charset="utf-8" /> + <title>Inputs</title> + <script> + class CustomTextBox extends HTMLElement { + constructor() { + super(); + + this.attachShadow({ mode: "open" }); + const wrapper = document.createElement("span"); + this.textbox = wrapper.appendChild(document.createElement("input")); + this.textbox.value = "adipisci"; + this.shadowRoot.append(wrapper); + } + + focus() { + this.textbox.focus(); + } + + select() { + this.textbox.select(); + } + + setSelectionRange(start, end) { + this.textbox.setSelectionRange(start, end); + } + + get selectionStart() { + return this.textbox.selectionStart; + } + + get selectionEnd() { + return this.textbox.selectionEnd; + } + + get value() { + return this.textbox.value; + } + } + customElements.define("x-input", CustomTextBox); + </script> + </head> + <body> + <div id="text">lorem</div> + <input type="text" id="input" value="ipsum" /> + <textarea id="textarea">dolor</textarea> + <div id="contenteditable" contenteditable="true">sit</div> + <iframe id="iframe" src="selectionAction_frame.html"></iframe> + <iframe id="designmode" src="selectionAction_frame.html"></iframe> + <iframe + id="iframe-xorigin" + src="http://127.0.0.1:4245/assets/www/selectionAction_frame_xorigin.html" + ></iframe> + <x-input id="x-input"></x-input> + </body> + <script> + addEventListener("load", function () { + document.getElementById("iframe").contentDocument.body.textContent = + "amet"; + var designmode = document.getElementById("designmode"); + designmode.contentDocument.body.textContent = "consectetur"; + designmode.contentDocument.designMode = "on"; + }); + </script> +</html> |