]> git.gir.st - VimFx.git/commit
Harden the `f` commands
authorSimon Lydell <simon.lydell@gmail.com>
Mon, 29 Feb 2016 12:50:48 +0000 (13:50 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Mon, 29 Feb 2016 12:50:48 +0000 (13:50 +0100)
commit464d1b5fb62b96cb5cff92a494b4aa93457f6359
tree357f5a485e780c2a8c93a820e27d9bb163c9267d
parent343fe1d01398e37628b90bab2a3f4b17d914dcfa
Harden the `f` commands

It sucks that you can't trust the DOM. It sucks that on rare occasions, pressing
`f` shows no hints, but still enters Hints mode, leaving a
“element.href.startsWith is not a function” (or similar) error in the browser
console.

This commit tries to harden against such cases, by never trusting DOM properties
or methods to exist and be of the correct type. CoffeeScripts `?` is awesome for
this.
extension/lib/commands-frame.coffee
extension/lib/commands.coffee
extension/lib/utils.coffee
Imprint / Impressum