Skip to content
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

Dynamic imports #4

Closed
2 tasks done
andrieshiemstra opened this issue Jun 1, 2020 · 3 comments
Closed
2 tasks done

Dynamic imports #4

andrieshiemstra opened this issue Jun 1, 2020 · 3 comments
Assignees

Comments

@andrieshiemstra
Copy link
Member

andrieshiemstra commented Jun 1, 2020

see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports

todo:

  • test if this works by default in new mozjs with the current hooks,
  • see if it works with different hooks,
@andrieshiemstra andrieshiemstra self-assigned this Jun 18, 2020
@andrieshiemstra
Copy link
Member Author

dyn import gets us err: "Dynamic module import is disabled or not supported in this context"
because we need to set the dynamic import hook

https://searchfox.org/mozilla-central/source/js/src/builtin/ModuleObject.cpp#1755

andrieshiemstra added a commit that referenced this issue Jun 18, 2020
andrieshiemstra added a commit that referenced this issue Jun 18, 2020
andrieshiemstra added a commit that referenced this issue Jun 20, 2020
@andrieshiemstra
Copy link
Member Author

andrieshiemstra commented Jun 20, 2020

ok, basic code works, next up

  • code quality
    • i'm doing a lot uf unnecesarry rooting to get the types i need
    • impl epr.handle()
    • figure out or create util for jsapi::handle -> rust::handle
    • epr for JSString/Value and not just object
    • replace closure with three seperate epr's?`
    • move to modules.rs as much as possible and make the util reusable
  • documentation
  • test cases
    • cached and uncached
    • unresolvable, see if prom rejects
    • unparsable, see if prom rejects

andrieshiemstra added a commit that referenced this issue Jun 21, 2020
andrieshiemstra added a commit that referenced this issue Jun 22, 2020
andrieshiemstra added a commit that referenced this issue Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant