blob: 901c5c1ac2c11cd6ee2069bf851652462b7ab76b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<!DOCTYPE html>
<title>The 'load' event on the style element should still fire after mutation</title>
<link rel="help" href="https://crbug.com/1323319">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async () => {
const style = document.createElement('style');
document.head.appendChild(style);
style.appendChild(document.createTextNode('@import url(/support/css-red.txt);'));
style.appendChild(document.createTextNode('body {color: green; }'));
// The 'load' event should fire.
await new Promise(resolve => style.onload = resolve);
});
</script>
|