mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-21 10:05:34 +08:00
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.
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
* @returns {Object} jQuery object.
|
||||
*/
|
||||
|
||||
JQLite.expando = 'ng';
|
||||
JQLite.expando = 'ng339';
|
||||
|
||||
var jqCache = JQLite.cache = {},
|
||||
jqId = 1,
|
||||
@@ -310,7 +310,7 @@ function jqLiteOff(element, type, fn, unsupported) {
|
||||
}
|
||||
|
||||
function jqLiteRemoveData(element, name) {
|
||||
var expandoId = element.ng,
|
||||
var expandoId = element.ng339,
|
||||
expandoStore = jqCache[expandoId];
|
||||
|
||||
if (expandoStore) {
|
||||
@@ -324,17 +324,17 @@ function jqLiteRemoveData(element, name) {
|
||||
jqLiteOff(element);
|
||||
}
|
||||
delete jqCache[expandoId];
|
||||
element.ng = undefined; // don't delete DOM expandos. IE and Chrome don't like it
|
||||
element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
|
||||
}
|
||||
}
|
||||
|
||||
function jqLiteExpandoStore(element, key, value) {
|
||||
var expandoId = element.ng,
|
||||
var expandoId = element.ng339,
|
||||
expandoStore = jqCache[expandoId || -1];
|
||||
|
||||
if (isDefined(value)) {
|
||||
if (!expandoStore) {
|
||||
element.ng = expandoId = jqNextId();
|
||||
element.ng339 = expandoId = jqNextId();
|
||||
expandoStore = jqCache[expandoId] = {};
|
||||
}
|
||||
expandoStore[key] = value;
|
||||
|
||||
Reference in New Issue
Block a user