Re: [w3c/webcomponents] Status codes for HTML Imports (#568)

Sorry, for not following the process.

My main use case for me is that, I build HTML partial/include system on top of HTML Imports (http://starcounter.io/html-partialsincludes-webcomponents-way/ we already have at least 4 other companies running that pattern).

1. I import HTML in fly by custom element. 
2. If it arrives successfully 200 I stamp `<template>` from inside into the main document - 

  > thanks to that all HTML Import driven or script driven depenencies in structured, well defined and consistent manner, while still being able to run inline scripts from within template, or use external document to prepare template.


3. then do some data-binding, theming, and layout management work on top of what comes

If for some reason server-side simply does not have content, I'd like to send it with 204, and let the custom element could notify author  about the reason his/hers screen looks blank. Also the custom element element will not do any decoration or data binding work on top of that.

Currently, if file served is just empty, `.linkElement.import` still becomes a Document, so I need to check `document.body.children.length === 0 && document.head.children.length === 0` (what loos to me like a hack).

Moreover, it would be great to be able to use the difference between 204 and 205.

Current HTML Imports serves great for partials, so it would be great to get support for similar use-cases with new spec.

-- 
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/568#issuecomment-248559186

Received on Wednesday, 21 September 2016 09:30:55 UTC