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).
(ef/at ["form input[type=text]"]
(ev/listen :blur (fn [event]
(let [node (.-target event)]
(ef/at node (ef/set-prop :data-test "a string"))
(.log js/console (ef/from node (ef/get-prop :data-test)))
(.log js/console (ef/from node (ef/get-attr :data-test)))))))
The first console log outputs undefined the second outputs a string.
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
:valueI getundefined. Even though I usedset-propto set the property.get-attrworks though.I have used the following snippet on Firefox 25 and Chrome 31 on Linux (Fedora 20).
The first console log outputs
undefinedthe second outputsa string.