Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

assertIsNodeWrapper triggering Firefox and IE11  #301

@wasbridge

Description

@wasbridge

When using jQuery (specifically the DataTables.net plugin) in combination with polymer in Firefox (latest) or IE11 assertIsNodeWrapper is triggered on the following jQuery (line 5641, version 2.1.4) function call

var pixelPositionVal, boxSizingReliableVal,
        docElem = document.documentElement,
        container = document.createElement( "div" ),
        div = document.createElement( "div" );

...

function computePixelPositionAndBoxSizingReliable() {
    div.style.cssText =
        // Support: Firefox<29, Android 2.3
        // Vendor-prefix box-sizing
        "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
        "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
        "border:1px;padding:1px;width:4px;position:absolute";
    div.innerHTML = "";
    docElem.appendChild( container );

    var divStyle = window.getComputedStyle( div, null );
    pixelPositionVal = divStyle.top !== "1%";
    boxSizingReliableVal = divStyle.width === "4px";

    docElem.removeChild( container );
}

The assert is thrown for both the appendChild and removeChild.

The reason the assert is called is because 'container' is not wrapped by webcomponents.js

I was manually able to correct this error by making sure to call wrapIfNeeded before any assertIsNodeWrapper call in webcomponents.js

Metadata

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