[w3c/webcomponents] Allowing serialized access to custom element implementation DOM for web archival benefits (#657)

I come from the perspective of wanting to archive web pages that are built out of custom elements from the browser extension itself (as part of my efforts for https://pagedash.com). This might also benefit traditional server-side web archivers such as the Internet Archive. 

As it currently stands, with the Shadow DOM, an element's actual HTML implementation is hidden from the parent (innerHTML or outerHTML both return `""`), and this is problematic for my purpose and also from an SEO-renderer's purpose (even Sam Li's http://github.com/GoogleChrome/rendertron uses Shady DOM polyfill to get SSR rendering to work instead).

We are totally fine on this front if web components contain largely static and self-contained data, but the reality is that most web components need "hydration" via a dynamic AJAX call, etc.

So I am proposing a way of exposing the custom element's DOM state in a serialized fashion so that SSRs and other tools can get a hold of the DOM and serve it "as is" without a hydration step.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/657

Received on Wednesday, 23 August 2017 17:54:15 UTC