Side navigation
#14799 closed bug (notabug)
Opened February 14, 2014 11:26PM UTC
Closed February 15, 2014 12:04AM UTC
Last modified February 15, 2014 12:28AM UTC
Data with hyphenated keys, set via plain object, becomes inaccessible via hyphenated key
Reported by: | rwaldron | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.0-rc1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
test(".data should not miss data-* w/ hyphenated property names #14047", function() { expect(2); var div = jQuery("<div>"); div.data({ "foo-bar": 1 }); div.data( "foo-bar", 2 ); equal( div.data( "foo-bar" ), 2, "data with property 'foo-bar' was correctly found"); equal( div.data( "fooBar" ), 2, "data with property 'fooBar' was correctly found"); });
This test fails the first assertion.
Intentional behaviour.