From 566ee61eec64b923ed60d5ab7f25e0075548c4e3 Mon Sep 17 00:00:00 2001 From: Antonio Yon Date: Fri, 10 Jan 2020 13:14:46 -0500 Subject: [PATCH] Updated creating a shadow root to use Shadow DOM v1 spec. This fixes the broken hints functionality as of Chrome 80.0.3955.4. --- content_scripts/hints.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content_scripts/hints.js b/content_scripts/hints.js index ad6556b6..79a25a16 100644 --- a/content_scripts/hints.js +++ b/content_scripts/hints.js @@ -37,9 +37,9 @@ Hints.matchPatterns = function(pattern) { var link = null; for (var i = 0; i < applicableFilters.length; i++) { link = findFirstOf(document.querySelectorAll(applicableFilters[i]), - function(e) { - return DOM.isVisible(e); - }); + function(e) { + return DOM.isVisible(e); + }); if (link !== null) break; } @@ -724,7 +724,7 @@ Hints.create = function(type, multi) { main.id = 'cVim-link-container'; main.top = document.scrollingElement.scrollTop + 'px'; main.left = document.scrollingElement.scrollLeft + 'px'; - Hints.shadowDOM = main.createShadowRoot(); + Hints.shadowDOM = main.attachShadow({ mode: 'open' }); try { document.lastChild.appendChild(main);