Skip to content

$(el).data() calls break due to camelCase conversion #436

Open
@liady

Description

Currently this migration script fixes only $.data() calls, but $.fn.data still have the incompatibility with automatic camelCase conversion.

// el: <div data-my-prop=test />
var data = $(el).data();
// data: {myProp: 'test'}
assert(data['my-prop']===test) // works on jQuery v2, fails on v3

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions