Skip to content

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

Closed as not planned
@liady

Description

@liady

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

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions