blob: ed2f70e196e061926c97817807a315415c625e87 [file] [log] [blame]
<!DOCTYPE html>
<title>Task and Microtask Ordering </title>
<link rel=author title="Joshua Bell" href="">
<link rel=help href="">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/common.js"></script>
.inner { padding: 46px; width: 0; margin: 0 auto; background: #d4d4d4; }
.outer { padding: 25px; width: 92px; background: #f1f1f1; }
<p>Click on the inner box:</p>
<div class="outer">
<div class="inner"></div>
// Based on:
log_test(function(t, log) {
// Let's get hold of those elements
var outer = document.querySelector('.outer');
var inner = document.querySelector('.inner');
// Let's listen for attribute changes on the
// outer element
new MutationObserver(function() {
}).observe(outer, {
attributes: true
// Here's a click listener...
function onClick() {
setTimeout(function() {
}, 0);
Promise.resolve().then(function() {
outer.setAttribute('data-random', Math.random());
// ...which we'll attach to both elements
inner.addEventListener('click', onClick);
outer.addEventListener('click', onClick);
}, [
], 'Level 1 bossfight (manual click)');