]> git.gir.st - VimFx.git/commit
Replace element `instanceof` checks with `.localName`
authorSimon Lydell <simon.lydell@gmail.com>
Sun, 21 Feb 2016 14:35:12 +0000 (15:35 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Tue, 23 Feb 2016 16:37:41 +0000 (17:37 +0100)
commit054c27460732e96b06d169ac2fcba3d9db5be447
treee04379e73188d8cc2f78e78fc46b47ad031a296b
parentd93439e5aec5093417cc3580d954fc03ae558f3d
Replace element `instanceof` checks with `.localName`

KISS.

Note: `instanceof` checks are still often useful for XUL elements, because some
interfaces are extended by several elements.

Also note that `.localName` is used instead of `.nodeName` because many XUL
pages embed HTML elements. When mixing namespaces like that, the `.nodeName`s of
HTML elements will start with `html:`, while `.localName` skips the prefix.
`.localName` also nicely always returns valid HTML node names in lowercase.
extension/lib/commands-frame.coffee
extension/lib/commands.coffee
extension/lib/events.coffee
extension/lib/hints.coffee
extension/lib/utils.coffee
Imprint / Impressum