mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-26 09:18:37 +09:00
32 lines
1.1 KiB
HTML
32 lines
1.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title id="desc">HTML5 Selection: Call selectAllChildren() where the parameter is a text node</title>
|
|
<script type="text/javascript">
|
|
function RunTest()
|
|
{
|
|
try
|
|
{
|
|
var selection = window.getSelection();
|
|
var div1 = document.getElementById("div1");
|
|
selection.selectAllChildren(div1.firstChild);
|
|
|
|
if ("" == selection.toString())
|
|
{
|
|
document.getElementById("testresult").firstChild.data = "PASS";
|
|
}
|
|
}
|
|
catch (ex)
|
|
{
|
|
document.getElementById("testresult").firstChild.data = "FAIL";
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="RunTest();">
|
|
<div id="div1">Call selectAllChildren() where the parameter is a text node</div>
|
|
<p>Test passes if the word "PASS" appears below.</p>
|
|
<div>Test result: </div>
|
|
<div id="testresult">FAIL</div>
|
|
</body>
|
|
</html>
|