mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
30 lines
559 B
HTML
30 lines
559 B
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<head>
|
|
<script>
|
|
|
|
function boom()
|
|
{
|
|
var div = document.querySelector("div");
|
|
div.contentEditable = "true";
|
|
div.focus();
|
|
|
|
var r = document.documentElement;
|
|
document["removeChild"](r);
|
|
document["appendChild"](r);
|
|
|
|
setTimeout(function() {
|
|
getSelection().collapse(div, 0);
|
|
document.execCommand("inserthtml", false, "a");
|
|
setTimeout(function() {
|
|
document.documentElement.removeAttribute("class");
|
|
}, 0);
|
|
}, 0);
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
|
|
<body onload="boom();"><div></div></body>
|
|
</html>
|