WindowOrWorkerGlobalScope constructor

WindowOrWorkerGlobalScope({
  1. CacheStorage? caches,
  2. bool? crossOriginIsolated,
  3. Crypto? crypto,
  4. IDBFactory? indexedDB,
  5. bool? isSecureContext,
  6. String? origin,
  7. Performance? performance,
  8. String atob(
    1. String
    )?,
  9. String btoa(
    1. String
    )?,
  10. void clearInterval([
    1. num?
    ])?,
  11. void clearTimeout([
    1. num?
    ])?,
  12. Future<Response> fetch(
    1. Object, [
    2. RequestInit?
    ])?,
  13. void queueMicrotask(
    1. VoidFunction
    )?,
  14. void reportError([
    1. dynamic
    ])?,
  15. num setInterval(
    1. Object, [
    2. num?,
    3. Iterable?
    ])?,
  16. num setTimeout(
    1. Object, [
    2. num?,
    3. Iterable?
    ])?,
  17. T structuredClone<T>(
    1. T, [
    2. StructuredSerializeOptions?
    ])?,
})

Implementation

factory WindowOrWorkerGlobalScope({
  _i3.CacheStorage? caches,
  _i2.bool? crossOriginIsolated,
  _i3.Crypto? crypto,
  _i3.IDBFactory? indexedDB,
  _i2.bool? isSecureContext,
  _i2.String? origin,
  _i3.Performance? performance,
  _i2.String Function(_i2.String)? atob,
  _i2.String Function(_i2.String)? btoa,
  void Function([_i2.num?])? clearInterval,
  void Function([_i2.num?])? clearTimeout,
  _i2.Future<_i3.Response> Function(
    _i2.Object, [
    _i3.RequestInit?,
  ])? fetch,
  void Function(_i3.VoidFunction)? queueMicrotask,
  void Function([_i2.dynamic])? reportError,
  _i2.num Function(
    _i2.Object, [
    _i2.num?,
    _i2.Iterable<_i2.dynamic>?,
  ])? setInterval,
  _i2.num Function(
    _i2.Object, [
    _i2.num?,
    _i2.Iterable<_i2.dynamic>?,
  ])? setTimeout,
  T Function<T>(
    T, [
    _i3.StructuredSerializeOptions?,
  ])? structuredClone,
}) =>
    WindowOrWorkerGlobalScope._(
      caches: caches ?? _i6.undefined,
      crossOriginIsolated: crossOriginIsolated,
      crypto: crypto ?? _i6.undefined,
      indexedDB: indexedDB ?? _i6.undefined,
      isSecureContext: isSecureContext,
      origin: origin,
      performance: performance ?? _i6.undefined,
      atob: atob == null ? null : _i4.allowInterop(atob),
      btoa: btoa == null ? null : _i4.allowInterop(btoa),
      clearInterval:
          clearInterval == null ? null : _i4.allowInterop(clearInterval),
      clearTimeout:
          clearTimeout == null ? null : _i4.allowInterop(clearTimeout),
      fetch: fetch == null ? null : _i4.allowInterop(fetch),
      queueMicrotask:
          queueMicrotask == null ? null : _i4.allowInterop(queueMicrotask),
      reportError: reportError == null ? null : _i4.allowInterop(reportError),
      setInterval: setInterval == null
          ? null
          : _i4.allowInterop((
              _i2.Object v0, [
              _i2.num? v1,
              a0,
              a1,
              a2,
              a3,
              a4,
              a5,
              a6,
              a7,
              a8,
              a9,
            ]) =>
              setInterval(
                v0,
                v1,
                [
                  a0,
                  a1,
                  a2,
                  a3,
                  a4,
                  a5,
                  a6,
                  a7,
                  a8,
                  a9,
                ],
              )),
      setTimeout: setTimeout == null
          ? null
          : _i4.allowInterop((
              _i2.Object v0, [
              _i2.num? v1,
              a0,
              a1,
              a2,
              a3,
              a4,
              a5,
              a6,
              a7,
              a8,
              a9,
            ]) =>
              setTimeout(
                v0,
                v1,
                [
                  a0,
                  a1,
                  a2,
                  a3,
                  a4,
                  a5,
                  a6,
                  a7,
                  a8,
                  a9,
                ],
              )),
      structuredClone:
          structuredClone == null ? null : _i4.allowInterop(structuredClone),
    );