Skip to content

iSourceHtml

Defined in: core/source/ihtml.ts:302

new iSourceHtml(): iSourceHtml

iSourceHtml

call(func, arg): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:322

param: (func: string, arg: string)

return: Promise<ISourceHtml>

Allow this item to call a pre-exposed function within the HTML Item

string

string

Promise<iSourceHtml>

ISourceHtml.call


enableBrowser60FPS(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:473

param: Promise

return: Promise<ISourceHtml>

Enable or disable browser source to render up to a maximum of 60FPS

Chainable.

boolean

Promise<iSourceHtml>

ISourceHtml.enableBrowser60FPS


enableBrowserJS(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:769

param: (value: boolean)

return: Promise<ISourceHtml>

Enables or disables execution of the set BrowserJs upon load. Note that disabling this will require item to be refreshed in order to remove any BrowserJS previously executed.

Chainable.

boolean

Promise<iSourceHtml>

ISourceHtml.enableBrowserJS


enableBrowserTransparency(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:434

param: Promise

return: Promise<ISourceHtml>

Enable or disable transparency of CEF browser

Chainable.

boolean

Promise<iSourceHtml>

ISourceHtml.enableBrowserTransparency


enableCustomCSS(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:984

param: (value: boolean)

return: Promise

Enables or disables application of custom CSS to the document

boolean

Promise<iSourceHtml>

ISourceHtml.enableCustomCSS


enableReloadOnSceneEnter(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:1173

param: (value: boolean)

return: Promise

Enables or disables refresh of source upon entering a scene containing an item of it (via setVisible)

boolean

Promise<iSourceHtml>

ISourceHtml.enableReloadOnSceneEnter


enableReloadOnShow(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:1134

param: (value: boolean)

return: Promise

Enables or disables refresh of source upon showing (via setVisible)

boolean

Promise<iSourceHtml>

ISourceHtml.enableReloadOnShow


getAllowRightClick(): Promise<boolean>

Defined in: core/source/ihtml.ts:554

return: Promise

Check if right click events are sent to the item or not.

item.getAllowRightClick().then(function(isRightClickAllowed) {
// The rest of your code here
});

Promise<boolean>

ISourceHtml.getAllowRightClick


getBrowserCustomSize(): Promise<Rectangle>

Defined in: core/source/ihtml.ts:495

return: Promise

Gets the custom browser window size (in pixels) for the item, if set, regardless of its layout on the mixer. Returns a (0, 0) Rectangle if no custom size has been set.

See also: #util/Rectangle Util/Rectangle

Promise<Rectangle>

ISourceHtml.getBrowserCustomSize


getBrowserJS(): Promise<string>

Defined in: core/source/ihtml.ts:593

return: Promise

Gets the javascript commands to be executed on item upon load

Promise<string>

ISourceHtml.getBrowserJS


getBrowserLoadStatus(): Promise<string>

Defined in: core/source/ihtml.ts:1092

return: Promise

Gets the load status of the html May return as any of the following:

  • ‘LOADED’ -> HTML is already loaded
  • ‘NOT LOADED’ -> HTML is not yet loaded
  • ‘LOAD ERROR’ -> Error in loading HTML
  • ‘UNKNOWN’ -> URL used is invalid or when status is checked right after adding new HTML source
  • ‘UNAVAILABLE’ -> Method for getting load status is unavailable for the XBC version

Promise<string>

ISourceHtml.getBrowserLoadStatus


getCustomCSS(): Promise<string>

Defined in: core/source/ihtml.ts:854

return: Promise

Gets the custom CSS applied to the document upon loading

Promise<string>

ISourceHtml.getCustomCSS


getPolicyStringFunction(customCSS): string

Defined in: core/source/ihtml.ts:619

string

string


getURL(): Promise<string>

Defined in: core/source/ihtml.ts:344

return: Promise

Gets the URL of this webpage item.

Promise<string>

ISourceHtml.getURL


isBrowser60FPS(): Promise<boolean>

Defined in: core/source/ihtml.ts:454

return: Promise

Check if browser can render up to a maximum of 60FPS

Promise<boolean>

ISourceHtml.isBrowser60FPS


isBrowserJSEnabled(): Promise<boolean>

Defined in: core/source/ihtml.ts:743

return: Promise

Gets if BrowserJS is enabled and executed on load

Promise<boolean>

ISourceHtml.isBrowserJSEnabled


isBrowserOptimized(): Promise<boolean>

Defined in: core/source/ihtml.ts:1073

return: Promise

Gets if browser instance is optimized via surface sharing

Promise<boolean>

ISourceHtml.isBrowserOptimized


isBrowserTransparent(): Promise<boolean>

Defined in: core/source/ihtml.ts:415

return: Promise

Check if browser is rendered transparent

Promise<boolean>

ISourceHtml.isBrowserTransparent


isCustomCSSEnabled(): Promise<boolean>

Defined in: core/source/ihtml.ts:958

return: Promise

Gets if custom CSS is enabled and applied to the document on load

Promise<boolean>

ISourceHtml.isCustomCSSEnabled


isReloadOnSceneEnterEnabled(): Promise<boolean>

Defined in: core/source/ihtml.ts:1154

return: Promise

Gets if source will refresh upon entering a scene containing an item of it (via setVisible)

Promise<boolean>

ISourceHtml.isReloadOnSceneEnterEnabled


isReloadOnShowEnabled(): Promise<boolean>

Defined in: core/source/ihtml.ts:1115

return: Promise

Gets if source will refresh upon showing (via setVisible)

Promise<boolean>

ISourceHtml.isReloadOnShowEnabled


isSourceAvailable(): Promise<boolean>

Defined in: core/source/ihtml.ts:1193

return: Promise

Check if file used as source is available

item.isSourceAvailable().then(function(isAvail) {
// The rest of your code here
});

Promise<boolean>

ISourceHtml.isSourceAvailable


setAllowRightClick(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:573

param: (value:boolean)

return: Promise<ISourceHtml>

Allow or disallow right click events to be sent to the item. Note that you can only catch right click events using mouseup/mousedown

Chainable

item.setAllowRightClick(true).then(function(item) {
// Promise resolves with the same Item instance
});

boolean

Promise<iSourceHtml>

ISourceHtml.setAllowRightClick


setBrowserCustomSize(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:524

param: Promise

return: Promise<ISourceHtml>

Sets the custom browser window size for the item regardless of its layout on the mixer

Chainable.

See also: #util/Rectangle Util/Rectangle

Rectangle

Promise<iSourceHtml>

ISourceHtml.setBrowserCustomSize


setBrowserJS(value, refresh?): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:666

param: (js: string, refresh: boolean = false)

return: Promise

Sets the javascript commands to be executed on item right upon setting and on load. Optionally set second parameter to true to refresh item (needed to clean previously executed JS code.)

Chainable.

string

boolean = false

Promise<iSourceHtml>

ISourceHtml.setBrowserJS


setCustomCSS(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:880

param: (value: string)

return: Promise<ISourceHtml>

Sets the custom CSS to be applied to the document upon loading

Chainable.

string

Promise<iSourceHtml>

ISourceHtml.setCustomCSS


setURL(value): Promise<iSourceHtml>

Defined in: core/source/ihtml.ts:375

param: (url: string)

return: Promise<ISourceHtml>

Sets the URL of this webpage item.

Chainable.

string

Promise<iSourceHtml>

ISourceHtml.setURL