DescriptionImplement lazy JS module initialisation.
The existing lazy JS object code only allows single objects to be evaluated
lazily, but a common pattern in existing modules is to define multiple objects
and functions in the same closure and attach them as various fields on an
existing object, which that interface doesn't provide for. The approach
implemented in this change leverages the module system by allowing clients to
set 'lazy fields' on already existing objects, which when accessed evaluate to
a given field in a given module.
BUG=104100
TEST=unit tests provided
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=128131
Patch Set 1 #
Total comments: 6
Messages
Total messages: 4 (0 generated)
|