forked from mirrors/gecko-dev
If we have a creator parser, then we were a parser-inserted script and should presumably be able to set a valid insertion point when we run or fire our load/error events. For the error event case, we do this in nsScriptElement::ScriptAvailable, so that async error events due to things like bogus script URLs do not end up with a valid insertion point. For the load event case, we just do this in ScriptEvaluated directly. ScriptEvaluated is called while the scriptloader has our script set as the current parser-inserted script. But for the error event case we need to maintain that state around the ScriptAvailable call that will fire the event.
12 lines
457 B
HTML
12 lines
457 B
HTML
<!doctype html>
|
|
<meta charset=utf-8>
|
|
<title>Test that the insertion point is defined in the load event of a parser-inserted script.</title>
|
|
<script src=/resources/testharness.js></script>
|
|
<script src=/resources/testharnessreport.js></script>
|
|
<script>
|
|
var t = async_test("");
|
|
var writeDone = t.step_func_done(function(text) {
|
|
assert_equals(text, "Some text");
|
|
});
|
|
</script>
|
|
<iframe src="support/script-onload-insertion-point-helper.html"></iframe>
|