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

Improves jQuery-wrapped elements check in isWrapped. #714

Closed
wants to merge 1 commit into from
Closed

Improves jQuery-wrapped elements check in isWrapped. #714

wants to merge 1 commit into from

Conversation

treycordova
Copy link

Checking for the existence of 'jquery' on an object is not as reliable
as looking at the constructor's prototype of the object. Doing that
affords us the opportunity to use 'jquery' for other means—and not to
determine that it's a jQuery-wrapped object. Of course, this merely
moves the problem up the chain. Regardless, it's a little more cemented
and will work for an even larger majority of cases.

Checking for the existence of 'jquery' on an object is not as reliable
as looking at the constructor's prototype of the object. Doing that
affords us the opportunity to use 'jquery' for other means—and not to
determine that it's a jQuery-wrapped object. Of course, this merely
moves the problem up the chain. Regardless, it's a little more cemented
and will work for an even larger majority of cases.
@Rycochet
Copy link
Collaborator

This one is likely to change a different way - thinking more along the lines of "check if it's array-like, and check if it's members are Elements" - that way we're not looking for specific libraries, and it can also work directly on things like el.children etc

@Rycochet Rycochet closed this in 04e6c35 Nov 3, 2016
Rycochet added a commit that referenced this pull request Dec 2, 2016
Rycochet added a commit that referenced this pull request Aug 3, 2020
…(not specific checking for jQuery / Zepto wrapped) Closes #714
Rycochet added a commit that referenced this pull request Aug 3, 2020
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

Successfully merging this pull request may close these issues.

2 participants