A WindowBase subclass does not implement addEventListener #16937
Labels
closed-as-intended
Closed as the reported issue is expected behavior
web-libraries
Issues impacting dart:html, etc., libraries
This issue was originally filed by [email protected]
https://api.dartlang.org/apidocs/channels/stable/#dart-dom-html.WindowBase reads:
void addEventListener(String type, EventListener listener, [bool useCapture])
Register an event handler of a specific event type on the EventTarget.
but the following code fails:
IFrameElement ife=new IFrameElement();
document.body.append(ife);
WindowBase nw=ife.contentWindow;
nw.addEventListener("message", (Event event) {
print("ev=$event");
});
Exception: Class '_DOMWindowCrossFrame' has no instance method 'addEventListener'.
The text was updated successfully, but these errors were encountered: