diff options
| author | mrmr1993 | 2015-05-13 00:16:20 +0100 | 
|---|---|---|
| committer | mrmr1993 | 2015-05-13 00:50:36 +0100 | 
| commit | 0e6692932d11e2c82514d65d0cd45e1325e2647c (patch) | |
| tree | fd44712763fa15077b7e8d7b0467204649eddda6 /content_scripts/ui_component.coffee | |
| parent | bf03ebf7b806a2c3a3a3c529191adcc7309b4a53 (diff) | |
| download | vimium-0e6692932d11e2c82514d65d0cd45e1325e2647c.tar.bz2 | |
Move the HUD to an iframe, managed by UIComponent
Diffstat (limited to 'content_scripts/ui_component.coffee')
| -rw-r--r-- | content_scripts/ui_component.coffee | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/content_scripts/ui_component.coffee b/content_scripts/ui_component.coffee index 5e0bd5d5..938a8411 100644 --- a/content_scripts/ui_component.coffee +++ b/content_scripts/ui_component.coffee @@ -3,6 +3,7 @@ class UIComponent    iframePort: null    showing: null    options: null +  shadowDOM: null    constructor: (iframeUrl, className, @handleMessage) ->      styleSheet = document.createElement "style" @@ -18,9 +19,9 @@ class UIComponent      @iframeElement.addEventListener "load", => @openPort()      shadowWrapper = document.createElement "div"      # PhantomJS doesn't support createShadowRoot, so guard against its non-existance. -    shadowDOM = shadowWrapper.createShadowRoot?() ? shadowWrapper -    shadowDOM.appendChild styleSheet -    shadowDOM.appendChild @iframeElement +    @shadowDOM = shadowWrapper.createShadowRoot?() ? shadowWrapper +    @shadowDOM.appendChild styleSheet +    @shadowDOM.appendChild @iframeElement      document.documentElement.appendChild shadowWrapper      @showing = true # The iframe is visible now.  | 
