-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow exporting without a script #9
Comments
We've definitely had discussions about this possibility, since it seems very natural to enable import/export declaratively. One thing we are losing with HTML Modules, which was available via HTML Imports is the declarative import via Do you have thoughts on how import/export might work with |
Instead of using <content import="module.html" namedimport="content"></content> we probably want something similar to named slots <p><slot importname="my-text">My default text</slot></p> |
@travisleithead maybe something like: <template import="summary-data.html">
<details>
<summary>
<code class="name"><<slot name="element-name">NEED NAME</slot>></code>
<i class="desc"><slot name="description">NEED DESCRIPTION</slot></i>
</summary>
<div class="attributes">
<h4>Attributes</h4>
<slot name="attributes"><p>None</p></slot>
</div>
</details>
<hr>
</template> |
This would be nice if it works without scripting enabled too as we could have a nice fallback that is downloaded only if scripting isn't enabled rather than shipping it to everyone: <noscript>
<content import="no-script-fallback.html"></content>
</noscript> |
This is definitely an interesting issue. However there's also some overlap I feel with the declarative custom elements strawman. Given that, it might be advantageous to defer this until after HTML modules have landed. Otherwise I feel there is risk that the whole thing becomes blocked. From what I can tell I don't feel this proposal would be affected by any of the choices already made in HTML modules (meaning it could be added later). |
I tend to agree this seems additive, and it's worth getting the foundations down first. |
Closing this issue and opening a linking issue in the webcomponents repo. (WICG/webcomponents#863) |
Define a new HTML content attribute,
export
orexportname
ornamedexport
(anddefaultexport
?) or something similar that allows elements to be exported without any inline scripts.I imagine some HTML modules might have no scripting logic, they would only exist to share content and inline scripts are too wordy for those cases.
That could maybe make them available from HTML directly as well...
A little bit like server-side includes. But this is crazy talk.
The text was updated successfully, but these errors were encountered: