treejs
treejs copied to clipboard
Invalid Node Names in Event Handler
Hi,
The event handler for the nodes has the nodeName properties encoded as all capitals.
HTML specification says lowercase; while this seems to work on plain HTML sites, this breaks the event handler for anything using xHTML.
Unfortunately, this is an inconsistency and mis-implementation by browser vendors that has persisted due to compatibility reasons.
The fix would be to either convert all nodeName properties to upper/lowercase before comparison or using the localName property instead, which correctly returns lowercase values in both cases.