1
0
mirror of synced 2024-11-22 21:16:10 +03:00

Cache objects in Utils.__cache instead of using $.data (#4346)

This commit is contained in:
alexweissman 2017-10-26 14:12:50 -04:00
parent 62c4f6332b
commit 1864a3d538
3 changed files with 24 additions and 25 deletions

View File

@ -13,6 +13,7 @@
- User-defined types not normalized properly when passed in as data (#4632) - User-defined types not normalized properly when passed in as data (#4632)
- Perform deep merge for `Defaults.set()` (#4364) - Perform deep merge for `Defaults.set()` (#4364)
- Fix "the results could not be loaded" displaying during AJAX request (#4356) - Fix "the results could not be loaded" displaying during AJAX request (#4356)
- Cache objects in `Utils.__cache` instead of using `$.data` (#4346)
- Removing the double event binding registration of `selection:update` (#4306) - Removing the double event binding registration of `selection:update` (#4306)
#### Accessibility #### Accessibility

View File

@ -272,10 +272,9 @@ define([
$element.append($nodes); $element.append($nodes);
}; };
// Cache objects in Utils.__cache instead of $.data // Cache objects in Utils.__cache instead of $.data (see #4346)
Utils.__cache = {}; Utils.__cache = {};
var id = 0; var id = 0;
Utils.GetUniqueElementId = function (element) { Utils.GetUniqueElementId = function (element) {
// Get a unique element Id. If element has no id, // Get a unique element Id. If element has no id,
@ -308,7 +307,6 @@ define([
Utils.__cache[id][name] = value; Utils.__cache[id][name] = value;
}; };
Utils.GetData = function (element, name) { Utils.GetData = function (element, name) {
// Retrieves a value from the cache by its key (name) // Retrieves a value from the cache by its key (name)
// name is optional. If no name specified, return // name is optional. If no name specified, return