A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/whatwg/html/issues/4723 below:

Consider adding an "ignore document.open/write" flag on document · Issue #4723 · whatwg/html · GitHub

Consider this testcase:

<script>
  location = something;
  document.write("hello");
</script>

Per spec as currently written, the location set will stop the pageload and start a new navigation, then the write() call will stop that navigation and blow away the document, replacing it with the string "hello".

None of the shipping browsers follow the spec here:

It turns out that if the testcase is modified slightly to:

<form action="something"></form>
<script>
  document.forms[0].submit()
  document.write("hello");
</script>

there are web compat requirements that either the navigation be async or there be a flag like the Firefox one, because otherwise the form submit will not complete. See https://crbug.com/955556 for details. Right now the spec has an async navigation for form submission, but we've been considering changing that to simplify the model, in which case we'd need to add a flag like the one Firefox has.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4