Side navigation
#14684 closed bug (notabug)
Opened January 09, 2014 04:00PM UTC
Closed January 09, 2014 04:05PM UTC
Data creates new object
| Reported by: | holdenru@gmail.com | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 2.0.2 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
http://jsfiddle.net/holden321/Pruj2/
var a={};
$(document).data(a);
console.log(a==$(document).data()); // returns false, expected: true, BUG?!
var a={};
$(document).data({a:a});
console.log(a==$(document).data('a')); // returns true, expected: true, OK
Attachments (0)
Change History (1)
Changed January 09, 2014 04:05PM UTC by comment:1
| resolution: | → notabug |
|---|---|
| status: | new → closed |
There is no API for setting the entirety of the data. You're using an API for setting multiple individual properties, of which you're setting none.