Closed acortelyou closed 7 years ago
Thanks for your contribution, @acortelyou
Unfortunately, I cannot accept your pull request in this form, as the getItemProperty
method should also accept that a property has been set to the empty string. With your change, that would not be possible anymore and could result in unwanted side effects.
For properties defined on the HTMLElement prototype as a DOMString (e.g. the title or id properties), undefined is not a possible value. Elements that do not have a value explicitly set for these properties by the markup will return empty string as the value rather than undefined, because the property is defined as a String in the DOM type system. I will submit another pull request which addresses this issue so that dataset attributes can be used to specify all object properties.
Thanks @acortelyou , for reference, the new (and merged) pull request is https://github.com/blueimp/Gallery/pull/223
Allows titles to be specified using data attributes.