jquery/jquery — pull request #1096 by rwldrn (2012-12-20 21:15:17+00:00)
Title: 2.0 data map

This re-write puts us in position to replace the internal data system with a `WeakMap`.

NOTE: The following changes will need to be made to other modules:

## css.js

```js
values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
```

This is the only place where a call to _set_ internal data is also expecting the value being set to be returned. There were no tests supporting this. Change to something like...

```js
values[ index ] = css_defaultDisplay( elem.nodeName );

jQuery._data( elem, "olddisplay", values[ index ] );`
```

## manipulation.js

In `cleanData`, direct access to the cache needs to be updated to use API. To remove all data cache references, use: `data_discard( owner )`

## events.js

Direct access to cache needs to be update to use API

## Ideal

Ideally we'd replace all calls to `jQuery._data` and jQuery._removeData` with `priv.access( elem, name );`, `priv.access( elem, name, data );` and `priv.remove( elem, name );`—ultimately to eliminate them from the exposed jQuery surface.