@firebase/webchannel-wrapper

  • Version 1.0.0
  • Published
  • 365 kB
  • No dependencies
  • Apache-2.0 license

Install

npm i @firebase/webchannel-wrapper
yarn add @firebase/webchannel-wrapper
pnpm add @firebase/webchannel-wrapper

Overview

A wrapper of the webchannel packages from closure-library for use outside of a closure compiled application

Index

Variables

variable ErrorCode

var ErrorCode: { NO_ERROR: number; HTTP_ERROR: number; TIMEOUT: number };

    variable Event

    var Event: { STAT_EVENT: string };

      variable EventType

      var EventType: { COMPLETE: string };
      • Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0

      variable Stat

      var Stat: { PROXY: number; NOPROXY: number };

        Functions

        function createWebChannelTransport

        createWebChannelTransport: () => WebChannelTransport;

          function getStatEventTarget

          getStatEventTarget: () => EventTarget;

            Classes

            class FetchXmlHttpFactory

            class FetchXmlHttpFactory {}

              constructor

              constructor(options: {});

                class XhrIo

                class XhrIo {}

                  method getLastError

                  getLastError: () => string;

                    method getLastErrorCode

                    getLastErrorCode: () => number;

                      method getResponseJson

                      getResponseJson: () => WebChannelError | object;

                        method getResponseText

                        getResponseText: () => string;

                          method getStatus

                          getStatus: () => number;

                            method listenOnce

                            listenOnce: (type: string, cb: (param: unknown) => void) => void;

                              method send

                              send: (
                              url: string,
                              method?: string,
                              body?: string,
                              headers?: Headers,
                              timeoutInterval?: number
                              ) => void;

                                method setWithCredentials

                                setWithCredentials: (withCredentials: boolean) => void;

                                  Interfaces

                                  interface EventTarget

                                  interface EventTarget {}

                                    method listen

                                    listen: (type: string | number, cb: (param: unknown) => void) => void;

                                      interface Headers

                                      interface Headers {}

                                        index signature

                                        [name: string]: string | number;

                                          interface StatEvent

                                          interface StatEvent {}

                                            property stat

                                            stat: number;

                                              interface WebChannel

                                              interface WebChannel extends EventTarget {}

                                                method close

                                                close: () => void;

                                                  method open

                                                  open: () => void;

                                                    method send

                                                    send: (msg: unknown) => void;

                                                      interface WebChannelError

                                                      interface WebChannelError {}

                                                        property error

                                                        error?: { status: string; message: string };

                                                          interface WebChannelOptions

                                                          interface WebChannelOptions {}

                                                            property clientProfile

                                                            clientProfile?: string;

                                                              property clientProtocolHeaderRequired

                                                              clientProtocolHeaderRequired?: boolean;

                                                                property concurrentRequestLimit

                                                                concurrentRequestLimit?: number;

                                                                  property detectBufferingProxy

                                                                  detectBufferingProxy?: boolean;

                                                                    property disableRedac

                                                                    disableRedac?: boolean;

                                                                      property encodeInitMessageHeaders

                                                                      encodeInitMessageHeaders?: boolean;

                                                                        property fastHandshake

                                                                        fastHandshake?: boolean;

                                                                          property forceLongPolling

                                                                          forceLongPolling?: boolean;

                                                                            property httpSessionIdParam

                                                                            httpSessionIdParam?: string;

                                                                              property initMessageHeaders

                                                                              initMessageHeaders?: {
                                                                              // To ensure compatibility with property minifcation tools, keys need to
                                                                              // be listed explicitly.
                                                                              [k: string]: never;
                                                                              };

                                                                                property internalChannelParams

                                                                                internalChannelParams?: { forwardChannelRequestTimeoutMs?: number };

                                                                                  property longPollingTimeout

                                                                                  longPollingTimeout?: number;

                                                                                    property messageContentType

                                                                                    messageContentType?: string;

                                                                                      property messageHeaders

                                                                                      messageHeaders?: {
                                                                                      // To ensure compatibility with property minifcation tools, keys need to
                                                                                      // be listed explicitly.
                                                                                      [k: string]: never;
                                                                                      };

                                                                                        property messageUrlParams

                                                                                        messageUrlParams?: { database?: string };

                                                                                          property requestRefreshThresholds

                                                                                          requestRefreshThresholds?: { [key: string]: number };

                                                                                            property sendRawJson

                                                                                            sendRawJson?: boolean;

                                                                                              property supportsCrossDomainXhr

                                                                                              supportsCrossDomainXhr?: boolean;

                                                                                                property useFetchStreams

                                                                                                useFetchStreams?: boolean;

                                                                                                  property xmlHttpFactory

                                                                                                  xmlHttpFactory?: unknown;

                                                                                                    interface WebChannelTransport

                                                                                                    interface WebChannelTransport {}

                                                                                                      method createWebChannel

                                                                                                      createWebChannel: (url: string, options: WebChannelOptions) => WebChannel;

                                                                                                        Namespaces

                                                                                                        namespace WebChannel

                                                                                                        namespace WebChannel {}

                                                                                                          variable EventType

                                                                                                          var EventType: { OPEN: string; CLOSE: string; ERROR: string; MESSAGE: string };

                                                                                                            Package Files (1)

                                                                                                            Dependencies (0)

                                                                                                            No dependencies.

                                                                                                            Dev Dependencies (7)

                                                                                                            Peer Dependencies (0)

                                                                                                            No peer dependencies.

                                                                                                            Badge

                                                                                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@firebase/webchannel-wrapper.

                                                                                                            • Markdown
                                                                                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@firebase/webchannel-wrapper)
                                                                                                            • HTML
                                                                                                              <a href="https://www.jsdocs.io/package/@firebase/webchannel-wrapper"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>