<!DOCTYPE html> | |
<html> | |
<head> | |
<link id="shouldLoad" rel="import" href="hello.html" onload="handle(event)"> | |
<link id="shouldError" rel="import" href="nosuch.html" onerror="handle(event)"> | |
</head> | |
<body> | |
<div id="toClick" onclick="handle(event)"></div> | |
<script> | |
document.currentScript.ownerDocument.getElementById('toClick').click(); | |
</script> | |
</body> | |
</html> |