diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/manipulation/getAll.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/manipulation/getAll.js b/src/manipulation/getAll.js index db876202d..86526a256 100644 --- a/src/manipulation/getAll.js +++ b/src/manipulation/getAll.js @@ -1,5 +1,6 @@ import { jQuery } from "../core.js"; import { nodeName } from "../core/nodeName.js"; +import { arr } from "../var/arr.js"; export function getAll( context, tag ) { @@ -8,7 +9,9 @@ export function getAll( context, tag ) { var ret; if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); + + // Use slice to snapshot the live collection from gEBTN + ret = arr.slice.call( context.getElementsByTagName( tag || "*" ) ); } else if ( typeof context.querySelectorAll !== "undefined" ) { ret = context.querySelectorAll( tag || "*" ); |