Skip to content

Instantly share code, notes, and snippets.

/.js

Created Apr 25, 2017
Embed
What would you like to do?
/**
* Gets 'data-*' property.
* See https://bugs.webkit.org/show_bug.cgi?id=161454
*/
function getDatasetProperty(dataset, propName) {
return typeof Reflect !== 'undefined' ? Reflect.get(dataset, propName) : dataset[ propName ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment