File tree 1 file changed +1
-2
lines changed
1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import toArray from '../_helpers/toarray';
3
3
import dom from '../_dom' ;
4
4
5
5
const customSelectorReg = / \s * : b o u n d \( ( [ ^ ( ] * ) \) \s * ( [ \S \s ] * ) \s * | \s * : s a n d b o x \s * ( [ \S \s ] * ) \s * / ;
6
+ const randomAttr = `${ Math . random ( ) . toString ( ) . replace ( '0.' , 'x' ) } y` ; // x12345y
6
7
7
8
// the function selects nodes based on a selector (including custom values, eg :sandbox)
8
9
// TODO: selectNodes looks not good, it needs to be refactored and accelerated if possible
@@ -34,8 +35,6 @@ export default function selectNodes(object, givenSelector) {
34
35
if ( subSelector . indexOf ( '>' ) === 0 ) {
35
36
// selecting children
36
37
nofn . forEach ( boundNodes , ( node ) => {
37
- const randomAttr = `m${ Math . random ( ) } ` . replace ( '.' , '' ) ;
38
-
39
38
node . setAttribute ( randomAttr , randomAttr ) ;
40
39
const selected = node . querySelectorAll (
41
40
`[${ randomAttr } ="${ randomAttr } "] ${ subSelector } `
You can’t perform that action at this time.
0 commit comments