Skip to content

Clarify that mixed types should not be passed to jQuery constructor #149

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

Closed
brandwaffle opened this issue Oct 16, 2012 · 0 comments
Closed

Comments

@brandwaffle
Copy link
Contributor

Pertains to: http://api.jquery.com/jQuery/

User Reported:
The page documents:
jQuery( elementArray )
elementArray -- An array containing a set of DOM elements to wrap in a jQuery object.

However, as far as I can see, elementArray may also contain jQuery objects. This is a nice feature. It would be nice if it was documented!

Dev Summit Notes:
Dave: incorrect assumption, however, it should be documented that passing jquery objects in the element array will cause them to be double-wrapped. Such a child node would be singularly unloved - it would be an orphan forever, never to be adopted - it would live a life of dickensian tragedy. Add docs saying NEVER PASS ANYTHING BUT DOM ELEMENTS via elementArray

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

No branches or pull requests

2 participants