Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chrome 80.0.3955.4] hints broken - Element.createShadowRoot deprecated #716

Open
rprimus opened this issue Nov 3, 2019 · 19 comments · May be fixed by #719
Open

[Chrome 80.0.3955.4] hints broken - Element.createShadowRoot deprecated #716

rprimus opened this issue Nov 3, 2019 · 19 comments · May be fixed by #719

Comments

@rprimus
Copy link

rprimus commented Nov 3, 2019

No description provided.

@rprimus
Copy link
Author

rprimus commented Nov 3, 2019

Sun Nov 3 22:24:36 GMT 2019

As of Chrome 80.0.3955.4, hints are broken. This is beacause:

[Deprecation] Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.

It has been replaced by attachShadow from ShadowDom v1.

This is causing the following errors in the console:

22:26:07.025 hints.js:727 Uncaught TypeError: main.createShadowRoot is not a function
    at hints.js:727
(anonymous) @ hints.js:727
setTimeout (async)
Hints.create @ hints.js:679
createHintWindow @ mappings.js:428
Mappings.convertToAction @ mappings.js:1152
down @ keys.js:733
(anonymous) @ keys.js:154

@rprimus rprimus changed the title hints broken - createShadowRoot deprecated hints broken - Element.createShadowRoot deprecated Nov 3, 2019
@rprimus
Copy link
Author

rprimus commented Nov 4, 2019

Mon Nov 4 00:01:46 GMT 2019

To get hints working again: in hints.hs:727, replace call to main.createShadowRoot() with main.attachShadow({mode: 'open'})

@rprimus rprimus changed the title hints broken - Element.createShadowRoot deprecated [Chrome 80.0.3955.4] hints broken - Element.createShadowRoot deprecated Nov 4, 2019
@zxteloiv
Copy link

Mon Nov 4 00:01:46 GMT 2019

To get hints working again: in hints.hs:727, replace call to main.createShadowRoot() with main.attachShadow({mode: 'open'})

Thanks! I followed the simple suggestion and have made the hints perfect after rebuilding.
Hope the version in Chrome Store could get updated soon.

My Env:
macOS 10.13.6
Microsoft Edge 80.0.345.0 (based on Chromium).

@grandsilence
Copy link

Have the same issue on Mac OS 10.14.6, Google Chrome 81.0.4000.3 (dev branch)

@grandsilence
Copy link

When new version will be uploaded to Chrome Market? Thank you.

@ShawnConn
Copy link

The #719 PR fix hasn't been merged yet to resolve this issue with Chrome80

@zyf0330
Copy link

zyf0330 commented Feb 7, 2020

Is there any way to hack this solution by tampermonkey?

@dcchambers
Copy link

For anyone coming from the web trying to fix this problem:

For now you'll have to manually install the extension from user @antonioyon's fork.

  1. Clone the repo: https://github.com/antonioyon/chromium-vim/tree/issue-716-fix-broken-hints
  2. Switch branches to issue-716-fix-broken-hints
  3. Install npm if you don't have it already.
  4. Run npm install and then make.
  5. Go to chrome://extensions in browser and select the "Load Unpacked Extension" button (may need developer mode enabled).
  6. Navigate to the directory with the code from above.

@YourSouLi5Mine
Copy link

YourSouLi5Mine commented Feb 8, 2020

I confirm what @dcchambers said. It works smoothly!

@dany74q
Copy link

dany74q commented Feb 16, 2020

Thanks @dcchambers - works great.

Side note: I've moved to use vimium, it provides an equivalent set of functionality, and hint creation worked out of the box (I believe it's more actively maintained as well)

@zyf0330
Copy link

zyf0330 commented Feb 16, 2020 via email

@DavidGretzschel
Copy link

And Vimium doesn't allow for opening multiple links with mf. Or copying the link of a hint with yf.
It's not the luxury I'm used to :(

@DavidGretzschel
Copy link

DavidGretzschel commented Feb 25, 2020

For anyone coming from the web trying to fix this problem:

For now you'll have to manually install the extension from user @antonioyon's fork.

  1. Clone the repo: https://github.com/antonioyon/chromium-vim/tree/issue-716-fix-broken-hints
  2. Switch branches to issue-716-fix-broken-hints
  3. Install npm if you don't have it already.
  4. Run npm install and then make.
  5. Go to chrome://extensions in browser and select the "Load Unpacked Extension" button (may need developer mode enabled).
  6. Navigate to the directory with the code from above.

ehhh.... looks kinda intimidating (at least on Windows). Is this even doable on Windows 10?

@DavidGretzschel
Copy link

DavidGretzschel commented Mar 1, 2020

@dcchambers
doesn't work with Windows. The npm stuff was doable. Tried for hours to make gnuWin32 give me make which didn't work. Ended up being able to use make working with Cygwin.

Am I missing something here? Step 6 just means to add "C:\Users\david\GitHub repositories\chromium-vim" after it's all done, yes?
Edit:
To be more specific: t works, jk works but no link hints whatsoever :(

@DavidGretzschel
Copy link

ah nvm, wrong fork.
Can confirm that this will work and is doable in Windows.
A guide for those who are not used to doing any of this in Windows to fill in some missing details.

get the npm stuff here (is included in the json installer)
https://nodejs.org/en/
Get Cygwyin here (make will be one of the default-installed packages).
http://www.cygwin.com
Install.
Add this variable to PATH:
C:\cygwin64\bin

Open an admin console and cd to the cloned repo.
npm install
then:
make
then:
in Chrome select the folder of the repo as an extension.

@CodyReichert
Copy link

Thanks @dcchambers.

This isn't a satisfactory solution for people who use Chrome on multiple computers, unfortunately. And since no changes have been put on master in over a year, I fear we may be stuck looking for an alternative.

I'll try to get a cvim2 or somesuch extension packaged up and pushed to the Chrome Web Store (or maybe someone will beat me to it). I love cVim and don't want to see it fall to the wayside.

@zgldh
Copy link

zgldh commented May 10, 2020

I recommend this one http://vimium.github.io/

@zyf0330
Copy link

zyf0330 commented May 10, 2020 via email

demonye pushed a commit to demonye/chromium-vim that referenced this issue Aug 6, 2020
demonye pushed a commit to demonye/chromium-vim that referenced this issue Aug 6, 2020
@tyage
Copy link

tyage commented Mar 29, 2021

FYI I saw this extension in chrome web store was updated to 1.3 in 2021-03-25 although this github repository hasn't updated yet.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
Diffs shows that the purpose of this update is to fix broken hints.

diff -r 1.2.99_0/content_scripts/hints.js 1.3_0/content_scripts/hints.js
727c727
<     Hints.shadowDOM = main.createShadowRoot();
---
>     Hints.shadowDOM = main.attachShadow({ mode: 'open' });

heronghua added a commit to heronghua/chromium-vim that referenced this issue Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.