Description
This issue was originally filed by [email protected]
This issue has the same roots as http://code.google.com/p/dart/issues/detail?id=2937&q=event&colspec=ID%20Type%20Status%20Priority%20Area%20Milestone%20Owner%20Summary
It's easy to reproduce it.
We have html page:
<html>
<style type="text/css">
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
</style>
<body>
<input type="text" id="button" value="button" />
</body>
</html>
And dart code:
import('dart:html')
void main() {
Element elem = document.query('button');
elem.$dom_addEventListener('webkitAnimationEnd', ([event]){ print('hack'); });
elem.on['webkitAnimationEnd'].add(([event]){ print('suggested way'); });
elem.style.cssText = '-webkit-animation: rotate 2s;';
}
The problem here is that the only 'hack' will be printed... 'on'-styled event binding is working only for a few simple events like 'click', 'focus', etc., but it's not enough...