Modify ↓
Ticket #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: | rwaldron, Jason@… | |
| Blocking: | Blocked by: |
Description
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
comment:1 Changed 4 months ago by gibson042
- Cc rwaldron added
- Owner set to gibson042
- Status changed from new to assigned
comment:2 Changed 4 months ago by gibson042
- Status changed from assigned to closed
- Cc Jason@… added
- Component changed from unfiled to manipulation
- Priority changed from undecided to low
- Milestone changed from None to 1.9.1
- Resolution set to fixed
Fixed: https://github.com/jquery/jquery/commit/fb0f2952929fbe0e8a39da8c7865a397c7e74835
Reporter, can you confirm that http://code.jquery.com/jquery-git2.js resolves the issue?
comment:4 Changed 4 months 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:6 Changed 4 months ago by gibson042
Reported at https://bugs.webkit.org/show_bug.cgi?id=109307
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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.