Skip to content

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

Closed
@brandwaffle

Description

@brandwaffle

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions