# Interface XarcSubAppClientV2

xarc subapp version client interface

interface XarcSubAppClientV2 {
HAS_WINDOW: boolean;
IS_BROWSER: boolean;
rt: _xarcV2RunTimeInfo;
version: number;
_start(ignore, callDepth): Promise<any>;
addOnLoadStart(name, load): void;
cdnInit(data): void;
cdnMap(name): string;
cdnUpdate(data, replace): void;
debug(...args): void;
dyn(id): unknown;
getOnLoadStart(name): any[];
start(): Promise<any>;
startSubAppOnLoad(options, data): void;
}

- Defined in subapp/types.ts:34

#####
Index

### Properties

HAS_WINDOW
IS_BROWSER
rt
version

### Methods

_start
addOnLoadStart
cdnInit
cdnMap
cdnUpdate
debug
dyn
getOnLoadStart
start
startSubAppOnLoad

## Properties

### HAS_WINDOW

HAS_WINDOW: boolean

- Defined in subapp/types.ts:36

### IS_BROWSER

IS_BROWSER: boolean

- Defined in subapp/types.ts:35

### rt

rt: _xarcV2RunTimeInfo

- Defined in subapp/types.ts:38

### version

version: number

- Defined in subapp/types.ts:37

## Methods

### _start

- _start(ignore, callDepth): Promise<any>

- #### Parameters

  - ignore: string[]
  - callDepth: number

  #### Returns Promise<any>

  - Defined in subapp/types.ts:65

### addOnLoadStart

- addOnLoadStart(name, load): void

- #### Parameters

  - name: string
  - load: any

  #### Returns void

  - Defined in subapp/types.ts:62

### cdnInit

- cdnInit(data): void

- Initialize CDN mapping

  #### Parameters

  - data: CDNData

    data to initialize with

  #### Returns void

  - Defined in subapp/types.ts:45

### cdnMap

- cdnMap(name): string

- Map an asset name to its CDN version

  #### Parameters

  - name: string

    asset name to map

  #### Returns string

  - Defined in subapp/types.ts:60

### cdnUpdate

- cdnUpdate(data, replace): void

- Add CDN mapping data from data into the CDN mapping for looking up assets

  #### Parameters

  - data: CDNData

    CDN data

  - replace: boolean

    replace existing entry?

  #### Returns void

  - Defined in subapp/types.ts:53

### debug

- debug(...args): void

- Need this for node.js. While chrome dev tools allow setting console level, node.js' console.debug is just an alias for console.log.

  #### Parameters

  - `Rest` ...args: any[]

  #### Returns void

  - Defined in subapp/types.ts:71

### dyn

- dyn(id): unknown

- Extract JSON data from a script tag

  #### Parameters

  - id: string

    script element id

  #### Returns unknown

  the data extracted

  - Defined in subapp/types.ts:79

### getOnLoadStart

- getOnLoadStart(name): any[]

- #### Parameters

  - name: string

  #### Returns any[]

  - Defined in subapp/types.ts:61

### start

- start(): Promise<any>

- #### Returns Promise<any>

  - Defined in subapp/types.ts:64

### startSubAppOnLoad

- startSubAppOnLoad(options, data): void

- #### Parameters

  - options: any
  - data: any

  #### Returns void

  - Defined in subapp/types.ts:63