Skip to content

"Assertion Failed" unwrapping event #636

Closed
@keithamus

Description

Abstract

I seem unable to simply instantiate an Event and dispatch it. Firefox throws an "Assertion Failed" error. This works fine in Chrome however (where I assume the ShadowDOM Polyfill is an effective no-op as Chrome already implements Shadow DOM).

Detail

I have polymer loaded, but I'm trying to manually instantiate a MouseEvent, and dispatch it to a regular DOM element - not involving Polymer. Because dispatchEvent and all of the event constructors have been overwritten, it goes through Polymer code.

I have a reduced test case available here.

document.createEvent('MouseEvent') creates me a GenericEvent from the ShadowDOM (see ShadowDOM events.js:L508-533. The problem seems to be dispatching the event, where an assertion fails in unwrap. The stack looks something like:

The conclusion of this is that the GenericEvent function does not return instances of the wrappers.* constructors - although I am sure the issue is more nuanced.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions