Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AppWebViewBase

A webview for a custom (workspace) app.

Hierarchy

Implements

  • Disposable

Index

Constructors

constructor

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.

extension

extension: ExtensionContext

The extension context.

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

module

  • Gets the underlying module.

    Returns AppModule

panel

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

    Returns WebviewPanel

scriptFile

  • get scriptFile(): string
  • Get the full path of the script file.

    Returns string

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

Protected clearTempDir

  • clearTempDir(): boolean
  • Clears the '.temp' sub folder.

    Returns boolean

    Temp folder has been cleared or not.

close

  • close(): Promise<boolean>
  • inheritdoc

    Returns Promise<boolean>

Protected Abstract createScriptArguments

  • Creates arguments for an event function.

    Parameters

    • eventName: string

      The name of the event.

    • Optional data: any

    Returns AppEventScriptArguments

    The created arguments.

Protected createTempFile

  • createTempFile(): string
  • Creates a new temp file, inside the '.temp' sub folder.

    Returns string

    The full path of the new file.

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 fileSystemItemExists

  • fileSystemItemExists(p: string): boolean
  • Checks if a file or folder exists, relative to '.data' sub folder.

    Parameters

    • p: string

      The path of the file / folder to check.

    Returns boolean

    Indicates if file / folder exists or not.

Protected fileSystemItemStat

  • fileSystemItemStat(p: string, lstat?: boolean): Stats | false
  • Returns file system information of a file or folder, relative to the '.data' sub folder.

    Parameters

    • p: string

      The path of the item.

    • Optional lstat: boolean

    Returns Stats | false

    The information or (false) if not found.

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.

Protected getAllWorkspaces

  • Returns the list of all workspaces.

    Returns WorkspaceInfo[]

    The list of workspaces.

Protected getEventFunction

  • getEventFunction(funcProvider: function): ego_contracts.AppEventFunction
  • Returns the function for an app event.

    Parameters

    • funcProvider: function

      The function provider.

        • (m: AppModule): ego_contracts.AppEventFunction
        • Parameters

          Returns ego_contracts.AppEventFunction

    Returns ego_contracts.AppEventFunction

    The function (if available).

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[]

Protected getTempDir

  • getTempDir(): string
  • Returns the full path of the temp directory.

    Returns string

    The temp directory.

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.

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

Protected onLoaded

  • onLoaded(): Promise<void>

Protected onLog

Protected onWebViewDisposed

  • onWebViewDisposed(): Promise<void>

Protected onWebViewMessage

Protected onWebViewVisibilityChanged

  • onWebViewVisibilityChanged(isVisible: boolean): 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[]

Protected readFile

  • readFile(p: string): Buffer
  • Reads a file, relative to '.data' sub folder.

    Parameters

    • p: string

      The path of the file.

    Returns Buffer

    The read data.

removeAllListeners

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

    • Optional event: string | symbol

    Returns this

Protected removeFileOrFolder

  • removeFileOrFolder(p: string): void
  • Reads a file or folder, relative to '.data' sub folder.

    Parameters

    • p: string

      The path of the file / folder.

    Returns void

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

Protected toFullDataPath

  • toFullDataPath(p: string): string
  • Returns a full path, relative to '.data' sub directory.

    Parameters

    • p: string

      The input path.

    Returns string

    The full path.

Protected writeFile

  • writeFile(p: string, data: any): void
  • Write data to a file, relative to '.data' sub folder.

    Parameters

    • p: string

      The path of the file.

    • data: any

      The data write.

    Returns void

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