diff options
| author | Stephen Blott | 2014-11-02 08:56:15 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2014-11-02 08:56:15 +0000 | 
| commit | 3bae8f0f8fc012720001caced69999160d9005fa (patch) | |
| tree | 896f52810677beac492d8d24759dc3b31e93f351 /lib | |
| parent | 28e9c8374bfc7a4fd479dbb958a4a87331fb0857 (diff) | |
| download | vimium-3bae8f0f8fc012720001caced69999160d9005fa.tar.bz2 | |
Centralize handling of event propagation.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dom_utils.coffee | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 8c0445c5..62e655e7 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -127,9 +127,12 @@ DomUtils =      document.documentElement.appendChild(flashEl)      setTimeout((-> DomUtils.removeElement flashEl), 400) +  suppressPropagation: (event) -> +    event.stopImmediatePropagation() +    suppressEvent: (event) ->      event.preventDefault() -    event.stopImmediatePropagation() +    @suppressPropagation(event)  root = exports ? window  root.DomUtils = DomUtils | 
