Re:Please consider not adopting Google WebComponents
by Blackthorn on Tuesday March 17, 2020 @10:27AM
(#22605087)
I don't see how this is a fundamental failure of web components and not an implementation issue of the completely ignored and disregarded save feature.
Re:Please consider not adopting Google WebComponents
by fxtentacle on Tuesday March 17, 2020 @10:32AM
(#22605131)
It should be very easy to make the HTML save function also store the contents of those #shadow-root elements, so I don't see much of a problem there once WebComponents support becomes stable.
Re:Please consider not adopting Google WebComponents
by smnthermes on Tuesday March 17, 2020 @05:14PM
(#22610508)
YouTube uses WebComponents, and its pages are unviewable with Wayback Machine: http://web.archive.org/web/20200317150441/https://www.youtub...
Re:Please consider not adopting Google WebComponents
by asdfasgasdgasdg on Tuesday March 17, 2020 @10:27AM
(#22605094)
Are you sure that's why? It seems possible that the issue is how the data is being loaded. How did you confirm that web components are the issue with loading that page from a saved file?
Re:Please consider not adopting Google WebComponents
by gildas on Tuesday March 17, 2020 @10:37AM
(#22605184)
Yes I'm sure. It was a bug in SingleFile [1] and to fix it (I'm the author), I must add a JavaScript script in the saved page to deserialize the shadow root contents that are missing. It means that JS is required to view this saved page correctly.
Re:Please consider not adopting Google WebComponents
by rictic on Tuesday March 17, 2020 @02:32PM
(#22608386)
Work is underway on speccing out declarative shadow doms, which would remove the need for that JS: https://github.com/mfreed7/declarative-shadow-dom
Re:Please consider not adopting Google WebComponents
by mattnewton on Tuesday March 17, 2020 @11:29AM
(#22605786)
I mean, JavaScript being required to view pages sounds like Pandora’s already opened box.
Re:Please consider not adopting Google WebComponents
by gildas on Tuesday March 17, 2020 @11:37AM
(#22605886)
I disagree, I develop SingleFile for 10 years. That's the first time I need to include a script in the saved page in order to display it properly. Until the existence of Web Components, JavaScript was not needed to display a saved page.
Edit: to be clear, saved pages are HTML snapshots, not full web apps stored in a page.
Re:Please consider not adopting Google WebComponents
by cameronfraser on Tuesday March 17, 2020 @01:57PM
(#22607899)
People save web pages?
[1] https://bugs.chromium.org/p/chromium/issues/list
Edit: This might be fixed, see my first post https://news.ycombinator.com/item?id=22604632