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

SlimerDude Wed 4 Oct

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

Fixed for next build

Login or Signup to reply.