Skip to content

Commit 5307f07

Browse files
committed
fix a small typo that attachShadow needs an argument
1 parent acf09d2 commit 5307f07

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

content_scripts/ui_component.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class UIComponent
2727
seamless: "seamless"
2828
shadowWrapper = DomUtils.createElement "div"
2929
# PhantomJS doesn't support createShadowRoot, so guard against its non-existance.
30-
@shadowDOM = shadowWrapper.attachShadow?() ? shadowWrapper.createShadowRoot?() ? shadowWrapper
30+
@shadowDOM = shadowWrapper.attachShadow?( mode: "open" ) ?
31+
shadowWrapper.createShadowRoot?() ? shadowWrapper
3132
@shadowDOM.appendChild styleSheet
3233
@shadowDOM.appendChild @iframeElement
3334
@toggleIframeElementClasses "vimiumUIComponentVisible", "vimiumUIComponentHidden"

content_scripts/vimium_frontend.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ flashFrame = do ->
247247
# PhantomJS doesn't support createShadowRoot, so guard against its non-existance.
248248
# https://hacks.mozilla.org/2018/10/firefox-63-tricks-and-treats/ says
249249
# Firefox 63 has enabled Shadow DOM v1 by default
250-
_shadowDOM = highlightedFrameElement.attachShadow?() ?
250+
_shadowDOM = highlightedFrameElement.attachShadow?( mode: "open" ) ?
251251
highlightedFrameElement.createShadowRoot?() ? highlightedFrameElement
252252

253253
# Inject stylesheet.

0 commit comments

Comments
 (0)