Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpResponseWebView

A web view displaying a HTTP response.

Hierarchy

Implements

  • Disposable

Index

Constructors

constructor

  • Initializes a new instance of that class.

    Parameters

    • result: HTTPRequestResult

      The response.

    Returns HttpResponseWebView

Properties

Protected _DISPOSABLES

_DISPOSABLES: Disposable[]

Stores disposable sub objects.

Protected _INTERVALS

_INTERVALS: Timer[]

Stores intervals.

Protected _QUEUE

_QUEUE: PQueue<PriorityQueue, DefaultAddOptions> = ego_helpers.createQueue()

The underlying queue.

Protected _TIMEOUTS

_TIMEOUTS: Timer[]

Stores timeouts.

httpResponse

httpResponse: string

The (source code) of the HTTP response.

isDisposed

isDisposed: boolean

Gets if object has been disposed or not.

isDisposing

isDisposing: boolean

Gets if the 'dispose()' method is currently executed or not.

isInFinalizeState

isInFinalizeState: boolean

Gets if the object is disposed or currently disposing.

result

result: HTTPRequestResult

The response.

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

panel

  • get panel(): WebviewPanel
  • Gets the underlying panel.

    Returns WebviewPanel

request

  • get request(): RequestOptions
  • Gets the underyling request context.

    Returns RequestOptions

response

  • get response(): IncomingMessage
  • Gets the underyling response context.

    Returns IncomingMessage

view

  • get view(): Webview
  • Gets the underlying web view.

    Returns Webview

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

Protected cleanupIntervals

  • cleanupIntervals(): void
  • Cleansup all timeouts.

    Returns void

Protected cleanupTimeouts

  • cleanupTimeouts(): void
  • Cleansup all timeouts.

    Returns void

close

  • close(): Promise<boolean>
  • Closes the web view.

    Returns Promise<boolean>

    A promise that indicates if operation was successful or not.

dispose

  • dispose(): void
  • inheritdoc

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

Protected generateHtml

  • generateHtml(): string
  • Generate the HTML for the view.

    Returns string

    The HTML.

Protected generateHtmlBody

  • generateHtmlBody(): string

Protected generateHtmlFooter

  • generateHtmlFooter(): string
  • Generate the HTML footer for the view.

    Returns string

    The HTML footer.

Protected generateHtmlHeader

  • generateHtmlHeader(): string
  • Generate the HTML header for the view.

    Returns string

    The HTML header.

Private getCharSet

  • getCharSet(): string
  • Returns string

Private getContentType

  • getContentType(): string
  • Returns string

Protected getFileResourceUri

  • getFileResourceUri(p: string): Uri
  • Returns an URI from the 'resources' directory.

    Parameters

    • p: string

      The (relative) path.

    Returns Uri

    The URI.

getMaxListeners

  • getMaxListeners(): number
  • Returns number

Protected getOptions

  • getOptions(): ego_contracts.WebViewWithPanelOptions
  • Gets the options for the underlying view.

    Returns ego_contracts.WebViewWithPanelOptions

    The options.

Protected getResourceUris

  • getResourceUris(): Uri[]
  • Returns the URIs for the web view's resources.

    Returns Uri[]

    The list of resources.

Protected getTitle

  • getTitle(): string

Protected getType

  • getType(): string

Protected getViewColumns

  • getViewColumns(): ego_contracts.ViewColumnSettings
  • Returns the settings for view columns.

    Returns ego_contracts.ViewColumnSettings

    The settings.

initialize

  • initialize(): Promise<void>
  • Initializes the view.

    Returns Promise<void>

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

Protected onDispose

  • onDispose(): void
  • inheritdoc

    Returns void

Protected onLoaded

  • onLoaded(): Promise<void>
  • Is invoked after the page inside the web view has been loaded.

    Returns Promise<void>

Protected onLog

Protected onWebViewDisposed

  • onWebViewDisposed(): Promise<void>
  • Is invoked, after the web view (panel) has been disposed.

    Returns Promise<void>

Protected onWebViewMessage

Protected onWebViewVisibilityChanged

  • onWebViewVisibilityChanged(isVisible: boolean): Promise<void>
  • Is invoked after the visibility of the web view has been changed.

    Parameters

    • isVisible: boolean

      Content is currently visible or not.

    Returns Promise<void>

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

open

  • open(): Promise<boolean>
  • Opens the web view.

    Returns Promise<boolean>

    A promise that indicates if operation was successful or not.

postMessage

  • postMessage<TData>(command: string, data?: TData): Promise<boolean>
  • Sends a message to the web view.

    Type parameters

    • TData

    Parameters

    • command: string

      The command to send.

    • Optional data: TData

    Returns Promise<boolean>

    The promise that indicates if operation was successful or not.

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc