typeError: Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node Polymer

13,599

I had the same issue. This is due to polymer-mini.html checks if the arg passed to document.documentElement.contains(node) is node type. Debugging i could see that an event propagated so the last iteration was window object causing this issue. My solution was adding ev.stopPropagation() to the code before removing action.

Share:
13,599
Prathap Parameswar
Author by

Prathap Parameswar

let {polymer,react,javacript,html,css,angular,canvas,3dsmax,design} = this.myKnowledge

Updated on July 25, 2022

Comments

  • Prathap Parameswar
    Prathap Parameswar almost 2 years

    I am trying to implement context menu using polymer paper menu. Whenever I remove node from dom. polymer is throwing error like this

    typeError: Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node'

    and I get the following error message:

    Error screenshot attached

    What shall I do?