mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 16:28:58 +00:00
Merge pull request #1135 from lightpanda-io/importmap
Importmap support
This commit is contained in:
24
src/tests/html/script/importmap.html
Normal file
24
src/tests/html/script/importmap.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<script src="../../testing.js"></script>
|
||||
|
||||
<script type=importmap>
|
||||
{
|
||||
"imports": {
|
||||
"core": "./import.js"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id=use_importmap type=module>
|
||||
import * as im from 'core';
|
||||
testing.expectEqual('hello', im.greeting);
|
||||
</script>
|
||||
|
||||
<script id=cached_importmap type=module>
|
||||
// hopefully cached, who knows, no real way to assert this
|
||||
// but at least it works.
|
||||
import * as im from 'core';
|
||||
testing.expectEqual('hello', im.greeting);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user