diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /mobile/android/geckoview/src/androidTest/assets/www/inputs.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
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> |