File

projects/wms-framework/src/lib/basecomponentmodel/NativeHost.ts

Description

Provides information about hosting environment.

Index

Properties

Constructor

constructor(nWindow?: Window, nDocument?: Document)

Creates an instance of NativeHost.

Parameters :
Name Type Optional
nWindow Window Yes
nDocument Document Yes

Properties

Public Readonly Content
Type : NativeContent

Information about the content area.

Public Readonly Source
Type : Uri

Source URL of the hosting environment.

import { Uri } from '../baseframework/Uri';
import { NativeContent } from './NativeContent';

/**
 * Provides information about hosting environment.
 *
 * @export
 * @class NativeHost
 * @wType System.Windows.Interop.SilverlightHost
 */
export class NativeHost {
  /**
   * Source URL of the hosting environment.
   *
   * @readonly
   * @type {Uri}
   * @memberof NativeHost
   */
  public readonly Source: Uri;

  /**
   * Information about the content area.
   *
   * @readonly
   * @type {NativeContent}
   * @memberof NativeHost
   */
  public readonly Content: NativeContent;

  /**
   * Creates an instance of NativeHost.
   *
   * @param {Window} [nWindow]
   * @param {Document} [nDocument]
   * @memberof NativeHost
   */
  constructor(nWindow?: Window, nDocument?: Document) {
    nWindow = nWindow ?? window;
    nDocument = nDocument ?? document;

    this.Source = new Uri(nWindow.location.href);
    this.Content = new NativeContent(nWindow, nDocument);
  }
}

result-matching ""

    No results matching ""