javascript - What are registry and defined under require.s.contexts._? -
what require.s.contexts._.defined
, require.s.contexts._.registry
?
are modules in registry
object defined ?
require.s.contexts
contains private data regarding contexts requirejs knows about. default context if not use context
configuration option called _
require.s.contexts._
contains private data regarding default context.
the registry
field of context data contains map hold module information temporarily. module in map after has been requested until has been loaded.
the defined
field contains map of modules defined in context. conceivably access directly there's no clear reason since require.defined(id)
tell whether module named id
defined in context require
belongs. (different contexts different instances of require
require
function knows context originated from.)
Comments
Post a Comment