874
edits
(added section on dependency injection) |
(→Dependency Injection: reworded) |
||
| Line 39: | Line 39: | ||
=== Dependency Injection === | === Dependency Injection === | ||
The manifest is essentially used as a high-level specification that guides the injection of dependencies into the Jetpack's global environment. | The manifest is essentially used as a high-level specification that guides the injection of dependencies into the Jetpack's global environment. | ||
For instance, if the manifest doesn't specify that the Jetpack needs access to the network, then the <tt>XMLHttpRequest</tt> object won't be inserted into the Jetpack's global scope—or perhaps a "dummy" object that raises a helpful security error when accessed will be injected in its place. | |||
Alternatively, if the manifest specifies that the Jetpack only needs to communicate with foo.com, then <tt>XMLHttpRequest</tt> will be injected but attenuated such that connections to domains other than foo.com will fail. | |||
=== Extenders === | === Extenders === | ||
edits