TypeError: Argument 1 of Window.getDefaultComputedStyle does not implement interface Element

Mother Lover

I have the following code outside my polymer element (in another polymer):

        $(mainThis.shadowRoot.querySelector('#test1')).click(function(e){
            mainThis.$.testelement.openPopup();
        });

The line:

mainThis.$.testelement.openPopup();

Is causing error:

TypeError: Argument 1 of Window.getDefaultComputedStyle does not implement interface Element.

openPopup - is my custom function in polymer "testelement". The error appears only in FireFox (version 31) on other browsers (Chrome, Safari, Opera) works perfect. How to fix it ?

Edit (openPopup function):

<script type="text/javascript">
    Polymer('popup-element', {

        domReady : function() {
            var mainThis = this;
            $(this.$.popup).on('click','.closebutton', function(e){
                mainThis.closePopup();
            });
        },
        openPopup : function (){
            $(this.$.popup).show();
            return this;
        },
        closePopup : function (){
            $(this.$.popup).hide();
            return this;
        }
    });

</script>
mitch

Ok, now I can see. I had the same problem. I have solved it like this: Instead of:

$(this.$.popup).show();

Try this:

this.$.popup.style.display = "block";

It seems, it is impossible to use jQuery in polymer element javascript function when you execute it from another polymer element (in firefox only!). Please somebody smarter than me to improve this answer :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

TypeError: Argument 1 of Window.getDefaultComputedStyle does not implement interface Element

From Dev

Polymer and Disqus on Firefox: Argument 1 of Window.getComputedStyle does not implement interface Element

From Dev

TypeError: Argument 1 of Node.appendChild does not implement interface Node

From Dev

MutationObserver - getting "TypeError: MutationObserver.observe: Argument 1 does not implement interface Node."

From Dev

Window.getComputedStyle does not implement interface Element error in Firefox

From Dev

Argument 1 of Node.appendChild does not implement interface Node

From Java

Dropbox Upload Javascript : TypeError: "'fetch' called on an object that does not implement interface Window."

From Dev

Bootstrap5 Modal Uncaught TypeError: 'querySelector' called on an object that does not implement interface Element

From Dev

Argument 1 of CanvasRenderingContext2D.putImageData does not implement interface ImageData

From Dev

Error 1: does not implement interface member

From Dev

TypeError: 'replaceState' called on an object that does not implement interface History

From Dev

TypeError: 'click' called on an object that does not implement interface HTMLElement

From Dev

TypeError: stepUp called on an object that does not implement interface HTMLInputElement

From Dev

TypeError: click called on object that does not implement interface HtmlElement

From Dev

Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'

From Dev

Catchable Fatal Error: Argument 1 passed to "...\FormType::__construct() must implement interface

From Dev

Symfony2: ContextErrorException: Catchable Fatal Error: Argument 1 passed to [...]::__construct() must implement interface [...] none given

From Dev

Specify that a Class argument must implement a particular interface

From Dev

Does not implement interface member issues

From Dev

Error: Does not implement interface member

From Dev

Error: Does not implement interface member

From Dev

Class does not implement interface member

From Dev

IEnumerator does not implement interface IEnumerable

From Dev

Does not implement interface member MVC

From Java

'append' called on an object that does not implement interface FormData

From Dev

Why does ArrayList implement RandomAccess Interface?

From Dev

How does Java implement interface polymorphism?

From Dev

'stepUp' called on an object that does not implement interface HTMLInputElement

From Dev

Visitor Pattern "does not implement interface" error

Related Related

  1. 1

    TypeError: Argument 1 of Window.getDefaultComputedStyle does not implement interface Element

  2. 2

    Polymer and Disqus on Firefox: Argument 1 of Window.getComputedStyle does not implement interface Element

  3. 3

    TypeError: Argument 1 of Node.appendChild does not implement interface Node

  4. 4

    MutationObserver - getting "TypeError: MutationObserver.observe: Argument 1 does not implement interface Node."

  5. 5

    Window.getComputedStyle does not implement interface Element error in Firefox

  6. 6

    Argument 1 of Node.appendChild does not implement interface Node

  7. 7

    Dropbox Upload Javascript : TypeError: "'fetch' called on an object that does not implement interface Window."

  8. 8

    Bootstrap5 Modal Uncaught TypeError: 'querySelector' called on an object that does not implement interface Element

  9. 9

    Argument 1 of CanvasRenderingContext2D.putImageData does not implement interface ImageData

  10. 10

    Error 1: does not implement interface member

  11. 11

    TypeError: 'replaceState' called on an object that does not implement interface History

  12. 12

    TypeError: 'click' called on an object that does not implement interface HTMLElement

  13. 13

    TypeError: stepUp called on an object that does not implement interface HTMLInputElement

  14. 14

    TypeError: click called on object that does not implement interface HtmlElement

  15. 15

    Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'

  16. 16

    Catchable Fatal Error: Argument 1 passed to "...\FormType::__construct() must implement interface

  17. 17

    Symfony2: ContextErrorException: Catchable Fatal Error: Argument 1 passed to [...]::__construct() must implement interface [...] none given

  18. 18

    Specify that a Class argument must implement a particular interface

  19. 19

    Does not implement interface member issues

  20. 20

    Error: Does not implement interface member

  21. 21

    Error: Does not implement interface member

  22. 22

    Class does not implement interface member

  23. 23

    IEnumerator does not implement interface IEnumerable

  24. 24

    Does not implement interface member MVC

  25. 25

    'append' called on an object that does not implement interface FormData

  26. 26

    Why does ArrayList implement RandomAccess Interface?

  27. 27

    How does Java implement interface polymorphism?

  28. 28

    'stepUp' called on an object that does not implement interface HTMLInputElement

  29. 29

    Visitor Pattern "does not implement interface" error

HotTag

Archive