cpr.adapters.PlatformAdapter

Provides APIs for interworking with external eXBuilder6 applications in third-party web applications inserted through embedded page control.

Index

Methods
Name Return Type Description
registerChannelFunction Registers a function that can be called on an upstream page channel.
unregisterChannelFunction Removes a function registered to an upstream page channel.
setFocusHandler Specifies a handler to give focus to the internal content when the external embedded page currently displaying the web content gains focus.
callHostFunction Promise<Object> Calls a function in an external eXBuilder application that displays the current web content.
focusHost Returns focus to the external eXBuilder application displaying the current web content.
getVersion String Get the adapter version.
getReleaseDate Date Get the release date of the adapter library.
disableAutoFocus Disables the default focus link action.

Methods

registerChannelFunction(funcName, func)
Registers a function that can be called on an upstream page channel.
Parameters
name type description
funcName String function name.
func Function function.
unregisterChannelFunction(func)
Removes a function registered to an upstream page channel. The host will no longer be able to call this function.
Parameters
name type description
func Function The function to remove.
unregisterChannelFunction(funcName)
Removes a function registered to an upstream page channel. The host will no longer be able to call this function.
Parameters
name type description
funcName String The name of the function to remove.
setFocusHandler(newHandler)
Specifies a handler to give focus to the internal content when the external embedded page currently displaying the web content gains focus.
Parameters
name type description
newHandler (forward: Boolean)=>Void focus handler.
callHostFunction(name, args, callType)
Calls a function in an external eXBuilder application that displays the current web content.
Parameters
name type description
name String function name.
args Array argument list.
callTypeoptional PageFunctionCallType default"normal" call type.
return Promise<Object> Promise object as a result of the call.
focusHost(forward)
Returns focus to the external eXBuilder application displaying the current web content.
Parameters
name type description
forward Boolean The direction in which the focus is transferred. Forward if true, reverse if false.
getVersion()
Get the adapter version.
return String adapter version.
getReleaseDate()
Get the release date of the adapter library.
return Date The distribution date of the adapter library.
disableAutoFocus()
Disables the default focus link action. Call setFocusHandler and focusHost when implementing focus directly using API.