Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<html class="reftest-wait">
<title>An event on an 'id'-referenced eventbase also begins use-element instances</title>
<link rel="match" href="../struct/reftests/reference/green-100x100.html">
<script src="/common/reftest-wait.js"></script>
<svg width="100" height="100">
<rect id="eventbase" width="0" height="0"/>
<symbol id="animated-symbol">
<rect width="100" height="100" fill="red">
<set attributeName="fill" to="green" begin="eventbase.click"/>
</rect>
</symbol>
<use href="#animated-symbol"/>
</svg>
<script>
window.onload = () => {
const svg = document.querySelector('svg');
svg.pauseAnimations();
document.getElementById('eventbase').dispatchEvent(new MouseEvent('click'));
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));
};
</script>