Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message if $(window).weaveMethod called #4

Open
sminnee opened this issue Nov 23, 2009 · 0 comments
Open

Unhelpful error message if $(window).weaveMethod called #4

sminnee opened this issue Nov 23, 2009 · 0 comments

Comments

@sminnee
Copy link

sminnee commented Nov 23, 2009

In my code I had a call like this:

 function parentMethod() {
    $(this).myWeaveMethod()
 }

In actual fact, $(this) was wrong - this referred to window, because I called parentMethod using setTimeout.

The error message that was returned was "el.getAttribute not found", referring to a line of code in the Weave selector engine. A little tricky to debug

Perhaps if $() is passed something other than a DOM element, concrete should fail with a better error message "Weave method myWeaveMethod called on a non-DOM object 'window'".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant