Skip to content

generated code for setTimeout doesn't work in browsers other than Chrome #586

Closed
@efortuna

Description

@efortuna

Chrome has a DOMWindow, whereas other browsers have just a Window object. The JavaScript code that we generate for setTimeout expects only a DOMWindow, causing a noSuchMethod exception to be thrown when run in another browser (say, Firefox).

varMethod("setTimeout$2", {
   "DOMWindow": function($0, $1) {
     return this.setTimeout($wrap_call$0(to$call$0($0)), $1);
   },
   "WorkerContext": function($0, $1) {
     return this.setTimeout($wrap_call$0(to$call$0($0)), $1);
   },
   "Object": function($0, $1) {
     return this.noSuchMethod("setTimeout", [$0, $1]);
   }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions