Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/backcolor-style-element-in-head.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
</style>
<script>
"use strict";
addEventListener("DOMContentLoaded", () => {
const style = document.querySelector("style");
getSelection().selectAllChildren(style);
style.contentEditable = true;
document.execCommand("backColor", false, "red");
}, {once: true});
</script>
</head>
<body></body>
</html>