Opened 9 years ago
Closed 9 years ago
#14460 closed bug (notabug)
.remove() inconsistent between Safari and Chrome
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 2.0.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Chrome Version: 30.0.1599.101 Safari Version: 6.0.5 (8536.30.1)
The following code will run successfully in Chrome, but not in Safari.
var results = $( "p" ), result = null, i; for(i = 0; i < results.length; i += 1) { result = results[i]; result.remove(); }
JSFiddle Test: http://jsfiddle.net/YqCzK/
In Safari, the segment will fail at result.remove() since the object does not have the remove function available (Actual error is 'undefined' is not a function.).
Calling remove() on the results array works in both browsers however.
Note: See
TracTickets for help on using
tickets.
Either use
or