Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebViewBase

A basic web view.

Hierarchy

Implements

  • Disposable

Index

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.

Private _panel

_panel: WebviewPanel

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.

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

panel

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

    Returns WebviewPanel

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 Abstract generateHtmlBody

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

    Returns string

    The HTML.

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.

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 Abstract getTitle

  • getTitle(): string
  • Returns the title for the web view.

    Returns string

    The title.

Protected Abstract getType

  • getType(): string
  • Returns the type of the web view.

    Returns string

    The type.

Protected getViewColumns

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

    Returns ego_contracts.ViewColumnSettings

    The settings.

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

  • Handles a log message from a web view.

    Parameters

    Returns Promise<void>

Protected onWebViewDisposed

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

    Returns Promise<void>

Protected onWebViewMessage

  • Handles a custom web view message.

    Parameters

    Returns Promise<boolean>

    The promise that indicates if message has been handled or not,

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