windowBindings top-level constant

List<FactoryProvider<Object>> const windowBindings

Provides Document, HtmlDocument, and Window bound for use within Angular.

Ideally, an application would limit direct use of these to maintain compatibility with web workers, but there is no Angular sanitized version yet available.

Implementation

const windowBindings = [
  // This strange syntax is required because we need windowBindings to be a
  // const list to be usable within component annotations.
  FactoryProvider(Document, getDocument),
  FactoryProvider(HtmlDocument, getDocument),
  FactoryProvider(Window, getWindow),
];