Cannot register DOMSubtreeModified through "on" #2937
Labels
closed-obsolete
Closed as the reported issue is no longer relevant
web-libraries
Issues impacting dart:html, etc., libraries
Milestone
See the full program below. This works:
div.$dom_addEventListener('DOMSubtreeModified', update);
This doesn't:
div.on['DOMSubtreeModified'].add(update);
By "work" I mean that "got event" is not printed in the console.
<!DOCTYPE html>
<html>
<head>
<title>Bug</title>
</head>
<body>
<script type="application/dart">
import('dart:html', prefix: 'html');
update(_) => print('got event');
main() {
final div = html.document.query('#mydiv');
// div.$dom_addEventListener('DOMSubtreeModified', update);
div.on['DOMSubtreeModified'].add(update);
div.nodes.add(new html.Element.html('<a href="index.html">home</a>'));
}
</script>
<div id="mydiv"></div>
</body>
</html>
The text was updated successfully, but these errors were encountered: