-
Notifications
You must be signed in to change notification settings - Fork 370
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
There should be a declarative way to import HTML modules #849
Comments
Isn't this |
It sounds to me like this is hinting at an ask for declarative custom elements that could be declared and imported even with JS turned off. I presume that right now all additional module types will be disabled along with JS - especially since without JS, there's nothing to do with them yet. I'm not sure how set in stone that is, but I guess that could be broached when we finally get to declarative custom elements. |
@rniwa @justinfagnani Yes, indeed. This is (also) about being able to use HTML modules with Javascript disabled. I'll edit the description to make this more clear. Thanks for pointing it out! |
I'd like to point out that even without any Javascript functionality, HTML imports with slotted templates might bring about quite a few benefits. While there's currently no way to register templates without Javascript, I hope this is something that will be addressed as soon as modules are through. |
Why not : Meaning being able to load template by external source adding a Another more exotic syntaxes can be: |
Another thought:
Delegating simple substitution to the browser-land, without needing JS for simple string or element replacement make it possible to use templates with no-script option.
Then JS authors can still get the template's source and use it as usualy... And finally, the ability to use another template with a
[EDIT]: This last attribute can also be simply |
Also with a
... but I still perfer the
But the precedence have to be solved when given along with a lightDOM content and a
(I'm sure how content element implementation can be used outside a ShadowRoot element...) This way dissociates the "importing" semantic form the "computed" semantic of a |
Even if a page is run in Therefore I do not think this statement should have any impact on what happens with this issue:
This is a separate issue. My interest in this issue is in being able to declare what modules I attempted to use. |
HTML modules promise a new way to structure and re-use HTML content. As such they fill a gap that has long filled by programmatic approaches, with varying success.
However; without a declarative way to consume HTML modules even the simplest use-case requires Javascript. There is no inherent reason why this should be necessary.
Since there are many use cases where HTML modules provide benefit even when there's no JS is in play, I suggest the addition of a declarative way to import HTML modules. This declarative means of importing HTML modules should not require Javascript to be enabled in the Browsers.
The text was updated successfully, but these errors were encountered: