Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#13282 closed bug (fixed)

QtWebKit -- TypeError: '[object Object]' is not a valid argument for 'Function.prototype.apply' (evaluating 'elem.nodeType')

Reported by: Jason@… Owned by: gibson042
Priority: low Milestone: 2.0
Component: manipulation Version: 2.0b1
Keywords: Cc: Rick Waldron, Jason@…
Blocked by: Blocking:


This error occurs on all QtWebKit-based browsers.

        for ( ; i < l; i++ ) {
            elem = elems[ i ];

            if ( elem || elem === 0 ) {

                // Add nodes directly
                if ( jQuery.type( elem ) === "object" ) {
                    core_push.apply( nodes, elem.nodeType ? [ elem ] : elem );
---> TypeError: '[object Object]' is not a valid argument for 'Function.prototype.apply' (evaluating 'elem.nodeType') <----

                // Convert non-html into a text node
                } else if ( !rhtml.test( elem ) ) {
                    nodes.push( context.createTextNode( elem ) );

                // Convert html into DOM nodes
                } else {
                    tmp = tmp || fragment.appendChild( context.createElement("div") );

Change History (7)

comment:1 Changed 5 years ago by gibson042

Cc: Rick Waldron added
Owner: set to gibson042
Status: newassigned

Per discussion in #jquery-meeting, we're going to back out the core_push.apply( <Array>, <NodeList> ) calls in favor of the older jQuery.merge( <Array>, <NodeList> ), reverting much of https://github.com/jquery/jquery/commit/dc93f8cbb59d230d707193118124689c6fd930ff et al.

comment:2 Changed 5 years ago by gibson042

Cc: Jason@… added
Component: unfiledmanipulation
Milestone: None1.9.1
Priority: undecidedlow
Resolution: fixed
Status: assignedclosed

comment:3 Changed 5 years ago by Jason@…

Works great. Thanks for looking into it.

comment:4 Changed 5 years ago by sindresorhus

Make sure to file a ticket on QtWebKit if there doesn't already exist one for this issue and add a link here.


comment:5 Changed 5 years ago by gibson042


comment:7 Changed 4 years ago by gibson042

#13574 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.