#2647 JS: dom::Elem.attrs() should be case insensitive

SlimerDude Wed 4 Oct 2017

Just to say Elem.attrs() should be case insensitive:

elem := Elem()
elem.setAttr("Foo", "bar")  // note the title case on "Foo"

elem.attr("foo")   // --> "bar"
elem.attr("FOO")   // --> "bar"

elem.attrs["foo"]  // --> "bar"
elem.attrs["FOO"]  // --> null    - expected "bar"
elem.attrs.keys    // --> ["foo"] - note all attributes are lower cased

It might also be worth making it read-only too, to prevent users from trying to use it to set or change new values.

andy Thu 5 Oct 2017

Fixed for next build

Login or Signup to reply.