diff options
| author | gdh1995 | 2018-10-28 11:45:14 +0800 |
|---|---|---|
| committer | gdh1995 | 2018-10-28 11:45:14 +0800 |
| commit | acf09d2285b47d5849b4315ac698182dad7e9c13 (patch) | |
| tree | b5353dbe5b82a31bb6da751ee85f06f9878ab11d /content_scripts/ui_component.coffee | |
| parent | 7c77b9bef6720283b04f6253b5e3cec0c7612b15 (diff) | |
| download | vimium-acf09d2285b47d5849b4315ac698182dad7e9c13.tar.bz2 | |
use Shadow DOM v1 if it exists
Chrome 70 has deprecated Shadow DOM v0
and displayed a warning when it's used.
And accroding to https://www.chromestatus.com/features/4507242028072960,
Shadow DOM v0 will be removed since Chrome 73.
The support for Shadow DOM v1 has been there since Chrome 53 and
is enabled by default on Firefox 63,
so it's time to use it.
Old support is still needed because Vimium's min_chrome_version is 51.
Diffstat (limited to 'content_scripts/ui_component.coffee')
| -rw-r--r-- | content_scripts/ui_component.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/ui_component.coffee b/content_scripts/ui_component.coffee index c71bfb35..f0815d08 100644 --- a/content_scripts/ui_component.coffee +++ b/content_scripts/ui_component.coffee @@ -27,7 +27,7 @@ class UIComponent seamless: "seamless" shadowWrapper = DomUtils.createElement "div" # PhantomJS doesn't support createShadowRoot, so guard against its non-existance. - @shadowDOM = shadowWrapper.createShadowRoot?() ? shadowWrapper + @shadowDOM = shadowWrapper.attachShadow?() ? shadowWrapper.createShadowRoot?() ? shadowWrapper @shadowDOM.appendChild styleSheet @shadowDOM.appendChild @iframeElement @toggleIframeElementClasses "vimiumUIComponentVisible", "vimiumUIComponentHidden" |
