File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff 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 .createShadowRoot ? () ? shadowWrapper
30+ @shadowDOM = shadowWrapper .attachShadow ? ( mode : " open" ) ?
31+ shadowWrapper .createShadowRoot ? () ? shadowWrapper
3132 @shadowDOM .appendChild styleSheet
3233 @shadowDOM .appendChild @iframeElement
3334 @ toggleIframeElementClasses " vimiumUIComponentVisible" , " vimiumUIComponentHidden"
Original file line number Diff line number Diff line change @@ -245,7 +245,10 @@ flashFrame = do ->
245245 # Create a shadow DOM wrapping the frame so the page's styles don't interfere with ours.
246246 highlightedFrameElement = DomUtils .createElement " div"
247247 # PhantomJS doesn't support createShadowRoot, so guard against its non-existance.
248- _shadowDOM = highlightedFrameElement .createShadowRoot ? () ? highlightedFrameElement
248+ # https://hacks.mozilla.org/2018/10/firefox-63-tricks-and-treats/ says
249+ # Firefox 63 has enabled Shadow DOM v1 by default
250+ _shadowDOM = highlightedFrameElement .attachShadow ? ( mode : " open" ) ?
251+ highlightedFrameElement .createShadowRoot ? () ? highlightedFrameElement
249252
250253 # Inject stylesheet.
251254 _styleSheet = DomUtils .createElement " style"
You can’t perform that action at this time.
0 commit comments