You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with the data attributes in HTML and found something which I think is a bug.
When getting a property which isn't :value I get undefined. Even though I used set-prop to set the property. get-attr works though.
I have used the following snippet on Firefox 25 and Chrome 31 on Linux (Fedora 20).
I will try to reproduce the issue. It certainly would be a bug if I can confirm. I don't see how get-attr is working at all though. Did the dom contain the attribute data-test also? Get prop is very very simple:
(defnget-prop"returns the property on the selected element or elements. in cases where more than one element is selected you will receive a list of values"
[prop]
(extr-multi-node
(fn [pnod]
(aget pnod (name prop)))))
I'm working with the data attributes in HTML and found something which I think is a bug.
When getting a property which isn't
:value
I getundefined
. Even though I usedset-prop
to set the property.get-attr
works though.I have used the following snippet on Firefox 25 and Chrome 31 on Linux (Fedora 20).
The first console log outputs
undefined
the second outputsa string
.The text was updated successfully, but these errors were encountered: