meetDeveloper / Dictionary-Anywhere

Dictionary extension that helps you stay focused on what you are reading by eliminating the need to search for meaning.
GNU General Public License v3.0
272 stars 54 forks source link

dom.webcomponents.shadowdom.enabled doesn't exist #40

Open vertigo220 opened 3 years ago

vertigo220 commented 3 years ago

Addons page says to set dom.webcomponents.shadowdom.enabled to enabled, but my browser (Waterfox 2020.12 64-bit) doesn't have that; it only has dom.webcomponents.enabled, which did make a difference when setting to enabled though it still doesn't work (just says "Searching Please Wait...") as mentioned in issue #34.

meetDeveloper commented 3 years ago

You also will need to enable dom.getRootNode.enabled. :) Then it will work for you.

I did not knew about waterfox browser, I will add this too in addons page and in github also so that future users of this extension does not face problem when using waterfox browser. :)

vertigo220 commented 3 years ago

Thanks! Works as expected now.

I'd also recommend adding a bit on what these two settings do and why they need to be changed. I've used lots of add-ons and don't recall ever having to change anything in about:config for them to work, including when using ones that generate pop-ups like this one does, so I wonder if there's a better way to achieve whatever is needed that requires them to be changed and I'd like to know what's happening when I change them so I know I'm not reducing security or functionality in some way.

meetDeveloper commented 3 years ago

I use shadow dom for the popup. I use Shadow DOM due to level of encapsulation it provides. You can read more about this here. Shadow DOM is recently been made available in browser that is why older version of browsers does not have it and some have it behind a flag. Firefox v63.0+ have this automatically available and there is no need for any config change, not sure why Waterfox does not have it enabled by default even in its latest version.

vertigo220 commented 3 years ago

Thanks. A few follow-up questions:

meetDeveloper commented 3 years ago

Yeah missed the link: https://glazkov.com/2011/01/14/what-the-heck-is-shadow-dom/

By encapsulation I mean by popup is separated from other things in page and their CSS does not affect my popup. I use function getRootNode, you can read about Shadow DOM, this is regarding that only, I downloaded WaterFox and tried the addon, and error was coming getRootNode is not a function then I saw we have to enable this config option.

Other addon if they do achieve they are simply not using shadow dom and it may cause style from outside bleed into their popup.

vertigo220 commented 3 years ago

Thanks again. Looks pretty neat. Didn't understand it all, but the gist seems to be that essentially it's like an island for code in the page, like an iframe for a single object.

So getRootNode must also be enabled by default in newer/other browsers, and just disabled by default in Waterfox for some reason, so calling the function failed. Interesting. Anyways, it's good to know more about these entries. Thanks for all the info. :)

Feel free to close the issue when you want. I'd do it but not sure if you want to keep it open until you make changes to the instructions.