zertosh / jquery-audit

jQuery Audit
MIT License
563 stars 26 forks source link

Error message is inaccurate #6

Closed DrewML closed 10 years ago

DrewML commented 10 years ago

Hey there,

To start with, thanks for writing this extension! This is a desperately needed tool in the jQuery community.

I am working on a legacy project right now that uses jQuery 1.4.2, and noticed the following error:

@(window.jQuery is missing)

I looked through devtoolsBackground.js, and noticed that the "Safety" checks are also doing:

(typeof window.jQuery._data !== 'function')

which would make this incompatible with versions of jQuery below 1.5x.

I haven't dug enough into the jQuery internals and your code, but how hard do you think it would be to support older versions? If it is too hard, maybe change the "Error" to be more explicit about what caused the failure?

Let me know if you want me to submit a pull request for any of the above. I'd be happy to help.

zertosh commented 10 years ago

Thanks for the detailed explanation. I tried to make it work with jQuery 1.4.2, but the way it stores event data is too different than more modern versions. So I added a different error message for when _data is missing. I just pushed that version to the Chrome Web Store, along with a few other fixes.

I welcome PRs. If you get it working on older versions of jQuery, that'd be awesome!

DrewML commented 10 years ago

Thanks for the quick response! I'll take a look this weekend and see how much work it would take.