Re: [whatwg/dom] Hook for SVG and HTML script element insertion (#575)

Another snippet that exposes differences between Firefox and Safari:

```html
<body>
<select id="select"><option selected>1</option></select>
<script>
var select = document.getElementById("select");

var script = document.createElement("script");
script.textContent = "console.log(select.selectedIndex);";

var option = document.createElement("option");
option.textContent = "2";
option.selected = true;

select.append(script, option);
</script>
```

Changing selectedness of options is defined as part of inserting steps, AFAIK. This prints 0 in Safari and 1 in Firefox.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/575#issuecomment-459747851

Received on Friday, 1 February 2019 14:52:37 UTC