ISourceHtml
Defined in: core/source/ihtml.ts:28
Properties
Section titled “Properties”getBrowserLoadStatus
Section titled “getBrowserLoadStatus”getBrowserLoadStatus: () =>
Promise<string>
Defined in: core/source/ihtml.ts:252
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
Returns
Section titled “Returns”Promise<string>
Methods
Section titled “Methods”call()
Section titled “call()”call(
func,arg):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:37
param: (func: string, arg: string)
return: Promise<ISourceHtml>Allow this source to call a pre-exposed function within the HTML Source
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<ISourceHtml>
enableBrowser60FPS()
Section titled “enableBrowser60FPS()”enableBrowser60FPS(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:94
param: Promise
return: Promise<ISourceHtml>Enable or disable browser source to render up to a maximum of 60FPS
Chainable.
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<ISourceHtml>
enableBrowserJS()
Section titled “enableBrowserJS()”enableBrowserJS(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:197
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.
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<ISourceHtml>
enableBrowserTransparency()
Section titled “enableBrowserTransparency()”enableBrowserTransparency(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:75
param: Promise
return: Promise<ISourceHtml>Enable or disable transparency of CEF browser
Chainable.
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<ISourceHtml>
enableCustomCSS()
Section titled “enableCustomCSS()”enableCustomCSS(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:232
param: (value: boolean)
return: Promise
Enables or disables application of custom CSS to the document
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<ISourceHtml>
enableReloadOnSceneEnter()
Section titled “enableReloadOnSceneEnter()”enableReloadOnSceneEnter(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:284
param: (value: boolean)
return: Promise
Enables or disables refresh of source upon entering a scene containing an item of it (via setVisible)
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<ISourceHtml>
enableReloadOnShow()
Section titled “enableReloadOnShow()”enableReloadOnShow(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:268
param: (value: boolean)
return: Promise
Enables or disables refresh of source upon showing (via setVisible)
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<ISourceHtml>
getAllowRightClick()
Section titled “getAllowRightClick()”getAllowRightClick():
Promise<boolean>
Defined in: core/source/ihtml.ts:135
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});Returns
Section titled “Returns”Promise<boolean>
getBrowserCustomSize()
Section titled “getBrowserCustomSize()”getBrowserCustomSize():
Promise<Rectangle>
Defined in: core/source/ihtml.ts:105
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
Returns
Section titled “Returns”Promise<Rectangle>
getBrowserJS()
Section titled “getBrowserJS()”getBrowserJS():
Promise<string>
Defined in: core/source/ihtml.ts:163
return: Promise
Gets the javascript commands to be executed on item upon load
Returns
Section titled “Returns”Promise<string>
getCustomCSS()
Section titled “getCustomCSS()”getCustomCSS():
Promise<string>
Defined in: core/source/ihtml.ts:204
return: Promise
Gets the custom CSS applied to the document upon loading
Returns
Section titled “Returns”Promise<string>
getURL()
Section titled “getURL()”getURL():
Promise<string>
Defined in: core/source/ihtml.ts:44
return: Promise
Gets the URL of this webpage source.
Returns
Section titled “Returns”Promise<string>
isBrowser60FPS()
Section titled “isBrowser60FPS()”isBrowser60FPS():
Promise<boolean>
Defined in: core/source/ihtml.ts:82
return: Promise
Check if browser can render up to a maximum of 60FPS
Returns
Section titled “Returns”Promise<boolean>
isBrowserJSEnabled()
Section titled “isBrowserJSEnabled()”isBrowserJSEnabled():
Promise<boolean>
Defined in: core/source/ihtml.ts:183
return: Promise
Gets if BrowserJS is enabled and executed on load
Returns
Section titled “Returns”Promise<boolean>
isBrowserOptimized()
Section titled “isBrowserOptimized()”isBrowserOptimized():
Promise<boolean>
Defined in: core/source/ihtml.ts:239
return: Promise
Gets if browser instance is optimized via surface sharing
Returns
Section titled “Returns”Promise<boolean>
isBrowserTransparent()
Section titled “isBrowserTransparent()”isBrowserTransparent():
Promise<boolean>
Defined in: core/source/ihtml.ts:63
return: Promise
Check if browser is rendered transparent
Returns
Section titled “Returns”Promise<boolean>
isCustomCSSEnabled()
Section titled “isCustomCSSEnabled()”isCustomCSSEnabled():
Promise<boolean>
Defined in: core/source/ihtml.ts:223
return: Promise
Gets if custom CSS is enabled and applied to the document on load
Returns
Section titled “Returns”Promise<boolean>
isReloadOnSceneEnterEnabled()
Section titled “isReloadOnSceneEnterEnabled()”isReloadOnSceneEnterEnabled():
Promise<boolean>
Defined in: core/source/ihtml.ts:275
return: Promise
Gets if source will refresh upon entering a scene containing an item of it (via setVisible)
Returns
Section titled “Returns”Promise<boolean>
isReloadOnShowEnabled()
Section titled “isReloadOnShowEnabled()”isReloadOnShowEnabled():
Promise<boolean>
Defined in: core/source/ihtml.ts:259
return: Promise
Gets if source will refresh upon showing (via setVisible)
Returns
Section titled “Returns”Promise<boolean>
isSourceAvailable()
Section titled “isSourceAvailable()”isSourceAvailable():
Promise<boolean>
Defined in: core/source/ihtml.ts:299
return: Promise
Check if file used as source is available
item.isSourceAvailable().then(function(isAvail) { // The rest of your code here});Returns
Section titled “Returns”Promise<boolean>
setAllowRightClick()
Section titled “setAllowRightClick()”setAllowRightClick(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:156
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});Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<ISourceHtml>
setBrowserCustomSize()
Section titled “setBrowserCustomSize()”setBrowserCustomSize(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:120
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
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ISourceHtml>
setBrowserJS()
Section titled “setBrowserJS()”setBrowserJS(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:176
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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ISourceHtml>
setCustomCSS()
Section titled “setCustomCSS()”setCustomCSS(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:216
param: (value: string)
return: Promise<ISourceHtml>Sets the custom CSS to be applied to the document upon loading
Chainable.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ISourceHtml>
setURL()
Section titled “setURL()”setURL(
value):Promise<ISourceHtml>
Defined in: core/source/ihtml.ts:56
param: (url: string)
return: Promise<ISourceHtml>Sets the URL of this webpage source.
Chainable.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ISourceHtml>