-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Integrating https://github.com/boa-dev/temporal to implement https://tc39.es/proposal-temporal/ was discussed at gterzian/unconf-rustweek-2025#7, and it seemed like doing this could provide a good example for the benefits of modularity.
But, I think Spidermonkey already implements temporal, so it may be challenging to integrate a separate implementation to replace the default one, although it would be a step in the direction of #30863.
Example of an existing integration is the one in Boa.
Looking at the code, I think we could do this in Servo but as via script/dom
and script_bindings/webidl
, but I'm not sure how to replace the feature of Spidermonkey.
I'm also not sure how to integrate the library using webidl, since the JS API is not expressed using webidl, but for example, I think we could try something like:
Have a Temporal
dom object, with all methods, like Temporal.PlainDate
, being constructors(note the NewTarget
, which is a constructor).
Needs further research.