Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

instanceof Event throws a TypeError #1716

Closed
MayhemYDG opened this Issue · 8 comments

2 participants

@MayhemYDG

TypeError: 'prototype' property of Event is not an object

// ==UserScript==
// @name           x
// @version        1
// @namespace      x
// @include        http://*
// @include        https://*
// @grant          GM_getValue
// ==/UserScript==

(function() {

    try {
      [] instanceof Event;
    } catch (err) {
      console.log(err);
    }

})();

Tested on Aurora + GM 1.8.

Works fine with // @grant none.

@MayhemYDG

Same goes for instanceof Blob

@MayhemYDG

unsafeWindow.Event doesn't seem to help.

@arantius
Collaborator

https://bugzilla.mozilla.org/show_bug.cgi?id=822399

Upstream claims this is fixed. As of Firefox 22? I'm not sure.

@arantius arantius closed this
@MayhemYDG

Looks like it yes, thanks.

@MayhemYDG

@arantius
You'll have to reopen this issue, or open a new one in the Bugzilla tracker.
[] instanceof Blob throws the following: TypeError: 'prototype' property of Blob is not an object.

It works fine with [] instanceof Event though.

Tested on Aurora 22.0a2 (2013-04-02).

@arantius
Collaborator

Reopened bug 846316 upstream.

@MayhemYDG

Looks like instanceof Blob is working fine in Nightly 25.0a1 (2013-07-14).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.