Skip to content

WIndow message handler throws exception in Opera 12 #2891

@gramster

Description

@gramster

I have this code:

    window.$dom_addEventListener("message", _handleMessage, false);

...

  void _handleMessage(e) {
    var message = e.data;
    ...
  }

The generated code for the handler looks like:

Reporter.prototype._handleMessage = function(e) {
  var message = e.get$data();
  ...
}

In Opera 12 (Opera Next), an exception gets thrown when a message is received:

Uncaught exception: Error
Error thrown at line 12, column 2 in $throw(e) in file://localhost/home/gram/dart/test/test.dart.js:
    throw e;
called from line 306, column 10 in <anonymous function: method>() in file://localhost/home/gram/dart/test/test.dart.js:
    $throw(new NoSuchMethodException(
called from line 4449, column 2 in <anonymous function: Reporter.prototype._handleMessage>(e) in file://localhost/home/gram/dart/test/test.dart.js:
    var message = e.get$data();

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-obsoleteClosed as the reported issue is no longer relevantweb-librariesIssues impacting dart:html, etc., libraries

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions