[question] `Instantiation(loader, result, source)` will assume `result` is callable in step 3, but `result` is just an exotic namespace object that is not callable.
Closed this issue · 5 comments
caridy commented
resolution: it could be a factory for back-compat with dynamic module systems.
action: it should test for callable or module registry, and act accordingly.
guybedford commented
Does this mean returning a factory in instantiate is no longer supported?
caridy commented
It is supported. Step 4 allows optionalInstance
to be callable, then in https://whatwg.github.io/loader/#ensure-linked we guarantee that the factory is executed, and that it returns a namespace exotic object.
guybedford commented
Will read more carefully next time. Thanks for clarifying!