mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 23:04:59 -05:00
Updates to data.js re-write to pass events and manipulation (full pass in local test runs)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
17
src/data.js
17
src/data.js
@@ -1,4 +1,4 @@
|
||||
var user, priv,
|
||||
var user, priv, data_user, data_priv,
|
||||
rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
|
||||
rmultiDash = /([A-Z])/g;
|
||||
|
||||
@@ -131,13 +131,14 @@ Data.prototype = {
|
||||
// This will be used by remove() in manipulation to sever
|
||||
// remaining references to node objects. One day we'll replace the dual
|
||||
// arrays with a WeakMap and this won't be an issue.
|
||||
// function data_discard( owner ) {
|
||||
// user.discard( owner );
|
||||
// priv.discard( owner );
|
||||
// }
|
||||
function data_discard( owner ) {
|
||||
user.discard( owner );
|
||||
priv.discard( owner );
|
||||
}
|
||||
|
||||
user = new Data();
|
||||
priv = new Data();
|
||||
// These may used throughout the jQuery core codebase
|
||||
user = data_user = new Data();
|
||||
priv = data_priv = new Data();
|
||||
|
||||
|
||||
jQuery.extend({
|
||||
@@ -198,7 +199,7 @@ jQuery.fn.extend({
|
||||
dataAttr( elem, name, data[ name ] );
|
||||
}
|
||||
}
|
||||
priv.set( elem, { hasDataAttrs: true });
|
||||
priv.set( elem, "hasDataAttrs", true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user