Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/scripting-1/the-script-element/execution-timing/079.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title> setting location to javascript URL from event handler </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="testlib/testlib.js"></script>
<script type="text/javascript">
log('inline script #1');
var t = async_test()
onload = t.step_func(function() {
log('onload handler');
document.getElementById("log").textContent = 'please wait...';
window.location='javascript:log("javascript: URL")';
setTimeout(t.step_func(function(){
log('timeout');
assert_array_equals(eventOrder, ['inline script #1', 'onload handler', 'onload ends', 'javascript: URL', 'timeout']);
t.done();
}), 200);
log('onload ends');
});
</script>
</head>
<body>
<div id="log">FAILED (This TC requires JavaScript enabled)</div>
</body>
</html>