Skip to content

Conversation

jwestbrook
Copy link
Collaborator

Based on the issue below sethtml5data() and gethtml5data() will write to
the dataset and the write the data-* attributes correctly in any
browsers that Prototype supports.

https://prototype.lighthouseapp.com/projects/8886/tickets/250-support-for-dataset-property-and-data-attributes

Based on the issue below sethtml5data() and gethtml5data() will write to
the dataset and the write the data-* attributes correctly in any
browsers that Prototype supports.

https://prototype.lighthouseapp.com/projects/8886/tickets/250-support-for-dataset-property-and-data-attributes
//simple test for native HTML5 dataset existence
var NATIVEHTML5DATASET = (function (){
var testelement = new Element("div",{"data-test-this-thing":"test"});
if(typeof testelement.dataset != 'undefined' && typeof testelement.dataset.testThisThing != 'undefined') return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return (testelement.dataset && testelement.dataset.testThisThing === 'test');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants