diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /layout/reftests/webcomponents/cross-tree-selection-1.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/webcomponents/cross-tree-selection-1.html')
-rw-r--r-- | layout/reftests/webcomponents/cross-tree-selection-1.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/layout/reftests/webcomponents/cross-tree-selection-1.html b/layout/reftests/webcomponents/cross-tree-selection-1.html new file mode 100644 index 000000000..1e4f02747 --- /dev/null +++ b/layout/reftests/webcomponents/cross-tree-selection-1.html @@ -0,0 +1,32 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<head> + <script> + function tweak() { + var host = document.getElementById("host"); + var shadow = host.createShadowRoot(); + + var textNode = document.createTextNode(" World"); + shadow.appendChild(textNode); + + // Create a selection with focus preceeding anchor + var selection = window.getSelection(); + var range = document.createRange(); + range.setStart(shadow, 1); + range.setEnd(shadow, 1); + selection.addRange(range); + selection.extend(shadow, 0); + + // Extend selection into a different node tree + // (from ShadowRoot into the previous node in the parent node tree). + setTimeout(function() { + selection.extend(document.getElementById("previous"), 0); + document.documentElement.className = ''; + }, 100); + } + </script> +</head> +<body onload="tweak()"> +<span id="previous">Hello</span><span id="host"></span> +</body> +</html> |