<script type="importmap" name="browser-fs-access" src="https://unpkg.com/browser-fs-access@0.33.0/dist/index.modern.js">
The current implementation seems like something I'd have to look up every time I wanted to use it. <script type="importmap" name="browser-fs-access" src="https://unpkg.com/browser-fs-access@0.33.0/dist/index.modern.js">
The current implementation seems like something I'd have to look up every time I wanted to use it.Consider similar for a larger amount of data:
<script type="custom-dsl">{ "very": { "large": "json", "object": "with", "many": "keys" }</script>
Even sticking strictly to JSON (the DSL can be any syntax), this has a few advantages to SGML-style attributes:1. Supports nesting to any depth
2. Easier to deserialize from an in-memory object in the most common server-side languages
3. Supports easy developer/hacker copypasta into a JS file for debugging.
4. Broader/better expand/collapse support in text editors (in the case of very large lists)
---
> I'd have to look up every time I wanted to use it
I'd likely have to look up the HTML attribute names just as much - I recall having to do this a lot at first with the viewport meta when it was introduced - the only real hurdle to get over with this is to internalise the following pattern (which, as mentioned, some in the JS community are already familiar with):
<script type="dsl-name">DSL SOURCE</script>Based on my limited experience with it, I was super-stoked to see it be basically: “oh, what I was messing around with last night when trying out deno!”
You can even `<script type="importmap" src="https://your.fave.cdn.example.org/shared-importmap.json"></s...` and share an importmap across multiple applications/projects.