shama / on-load

On load/unload events for DOM elements using a MutationObserver
113 stars 19 forks source link

Update to export key attr variable #20

Closed joshgillies closed 7 years ago

joshgillies commented 7 years ago

Currently in order to confirm whether a node has had on-load applied correctly I have to do a fairly gnarly brute force against /^data-onloadid/.test(node.attributes[...].name).

I feel like by exposing the attribute key used internally by on-load will provide a much nicer interface to achieve the same result. eg. node.hasAttribute(onload.KEY_ATTR)

joshgillies commented 7 years ago

@shama thoughts on merging this one?

toddself commented 7 years ago

@joshgillies sorry for the delay, but thank you for the pull! this is released as :package: 3.3.0