HTML Modules
Now that JavaScript modules are on the verge of widespread browser support, we should think about an HTML module system that plays well with it. HTML Imports doesn't have a mechanism for exporting symbols, nor can they be imported by JavaScript, however its loading behavior is quite compatible with JavaScript modules. @dglazkov sketched out a proposal for HTML modules here: https://github.com/dglazkov/webcomponents/blob/html-modules/proposals/HTML-Imports-and-ES-Modules.md The main points are that, using the JavaScript modules plumbing, you can import HTML. Either in HTML: ```html <script type="module" url="foo.html"> ``` or JavaScript: ```js import * as foo from "foo.html"; ``` But within the scope of that sketch there are still several questions about the specifics of exporting symbols from HTML and importing to JavaScript.
Posted by justinfagnani on Jun 20, 2017, 3:30 PM
Tags
Related issues
- Add 65536 size support for maps
- TypeScript 7.1 Iteration Plan
- nvim-treeconfig: upstream nvim-treesitter
- Add the "action" and "method" attributes to <button>
- [FEATURE] Support multiple Connector accounts (same connector, different accounts) in Claude and Claude Code on the web (claude.ai/code)
- > We were imposed GitHub for so many exercises!
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
support (Software)
Add 65536 size support for maps
TypeScript 7.1 Iteration Plan
nvim-treeconfig: upstream nvim-treesitter
Add the "action" and "method" attributes to <button>
[FEATURE] Support multiple Connector accounts (same connector, different accounts) in Claude and Claude Code on the web (claude.ai/code)
> We were imposed GitHub for so many exercises!
Add support for Visual Studio 2026 Integration
Support for Helm v4
HTML Modules
Now that JavaScript modules are on the verge of widespread browser support, we should think about an HTML module system that plays well with it. HTML Imports doesn't have a mechanism for exporting symbols, nor can they be imported by JavaScript, however its loading behavior is quite compatible with JavaScript modules. @dglazkov sketched out a proposal for HTML modules here: https://github.com/dglazkov/webcomponents/blob/html-modules/proposals/HTML-Imports-and-ES-Modules.md The main points are that, using the JavaScript modules plumbing, you can import HTML. Either in HTML: ```html <script type="module" url="foo.html"> ``` or JavaScript: ```js import * as foo from "foo.html"; ``` But within the scope of that sketch there are still several questions about the specifics of exporting symbols from HTML and importing to JavaScript.
Comments (0)
No comments yet. Start the discussion.