-
-
Couldn't load subscription status.
- Fork 24
Closed
Labels
Milestone
Description
New Feature Proposal
Description
Now there is Jint v3 support, there should also be support for JS modules and import maps.
Background
Currently AngleSharp.Js only parses and executes script elements with type="javascript", so it will ignore the newer modules and import maps.
An example of a simple test scenario:
<!doctype html>
<script type="importmap">
{
"imports": {
"jquery": "https://cdn.jsdelivr.net/npm/[email protected]/+esm"
}
}
</script>
<script type="module">
import { $ } from 'jquery';
console.log($.toString());
</script>
Specification
The JsScriptingService needs to be updated to also allow processing of module and importmap script elements.
And then depending on the type it will need to run different Jint commands to deal with modules and import maps.