Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 74e1cc6

Browse files
committed
fix(jqLite): change expando property to a more unique name
This was causing issue when element === window A better strategy can be thought of later on.
1 parent a4faa5c commit 74e1cc6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/jqLite.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
* @returns {Object} jQuery object.
9999
*/
100100

101-
JQLite.expando = 'ng';
101+
JQLite.expando = 'ng339';
102102

103103
var jqCache = JQLite.cache = {},
104104
jqId = 1,
@@ -310,7 +310,7 @@ function jqLiteOff(element, type, fn, unsupported) {
310310
}
311311

312312
function jqLiteRemoveData(element, name) {
313-
var expandoId = element.ng,
313+
var expandoId = element.ng339,
314314
expandoStore = jqCache[expandoId];
315315

316316
if (expandoStore) {
@@ -324,17 +324,17 @@ function jqLiteRemoveData(element, name) {
324324
jqLiteOff(element);
325325
}
326326
delete jqCache[expandoId];
327-
element.ng = undefined; // don't delete DOM expandos. IE and Chrome don't like it
327+
element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
328328
}
329329
}
330330

331331
function jqLiteExpandoStore(element, key, value) {
332-
var expandoId = element.ng,
332+
var expandoId = element.ng339,
333333
expandoStore = jqCache[expandoId || -1];
334334

335335
if (isDefined(value)) {
336336
if (!expandoStore) {
337-
element.ng = expandoId = jqNextId();
337+
element.ng339 = expandoId = jqNextId();
338338
expandoStore = jqCache[expandoId] = {};
339339
}
340340
expandoStore[key] = value;

0 commit comments

Comments
 (0)