github / relative-time-element

Web component extensions to the standard <time> element.

Home Page:https://github.github.io/relative-time-element/examples/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GeasyFork site problem support Waterfox Classic ?

decembre opened this issue · comments

I Notice a problem with Waterfox Classic with date of comments on Greasyfork:
[Waterfox Classic] No Posted Time for Comments

With Waterfox Classic, the Posted time appear briefly and disappear after...

Work on Firefox Quantum:
in it, i notice an "#shadow-root(open)" element.

Thanks for the issue @decembre.

If you're using this custom element in a browser that does not support custom elements, it will revert to whatever the server rendered content is. If you wish for the actual behaviour of this element, it requires Custom Elements and ShadowDOM to work, you'll need to provide polyfills for those if you're interested in supporting older browsers. It looks as though the GreasyFork website does not include any Custom Elements polyfills, which would mean that the use of RelativeTime would fall back to no behaviour.

Briefly attempting to reproduce by visiting https://github.github.io/relative-time-element/examples/ in Waterfox Classic, I can see that it does not support Web Components/Custom Elements by default. Are you perhaps running an extension or user script which provides some kind of custom elements support?

If you're including a custom elements polyfill script or extension in your browser, then this polyfill will either need to fully support ShadowDOM, or explicitly not support it (by not providing the attachShadow functionality). RelativeTime checks for support of attachShadow before using shadowDOM:

#renderRoot: Node = this.shadowRoot ? this.shadowRoot : this.attachShadow ? this.attachShadow({mode: 'open'}) : this

If you are using a polyfill for custom elements which provides that attachShadow method but otherwise does not support ShadowDOM, that may explain the problems you're having.

Thanks for the explanation!
Because i am only an user of it, I give it to the dev of Greasyfork...

And yes i use, on my side, an extension (very undocumented) named "Polly".
On Greasyfork site, "Polly" is useful here in some case:
It is useful when i want to re Edit a comment.
Without it, i can't re edit a post.

For that, i need to enable "Polly" options:
These 2 options in "Polly" are :
1 - Request modification method for this domain
2 - Pollyfills/Webcomponents-Bundle.js

But... whit these options enable, that break your function....

Unfortunately as I can't really see what the "Polly" extension does I won't be able to help any further; a quick web search suggests this extension is no longer maintained and the source code has been removed from their repository.

As this repository works in modern browsers, and falls back gracefully in stock Waterfox, it leaves us with little to go on. Consequently I'll close this issue. You might want to explore alternatives to the "Polly" extension, perhaps if you find one that is actively maintained and still causes issues with this element, then we can explore options then. Thanks for your understanding.