SWebBrowserView::BindUObject

Expose a [UObject](API\Runtime\CoreUObject\UObject\UObject) instance to the browser runtime.

Windows
MacOS
Linux

References

Module

WebBrowser

Header

/Engine/Source/Runtime/WebBrowser/Public/SWebBrowserView.h

Include

#include "SWebBrowserView.h"

Source

/Engine/Source/Runtime/WebBrowser/Private/SWebBrowserView.cpp

Syntax

void BindUObject
(
    const FString & Name,
    UObject * Object,
    bool bIsPermanent
)

Remarks

Expose a UObject instance to the browser runtime. Properties and Functions will be accessible from JavaScript side. As all communication with the rendering procesis asynchronous, return values (both for properties and function results) are wrapped into JS Future objects.

Parameters

Parameter

Description

Name

The name of the object. The object will show up as window.ue4.{Name} on the javascript side. If there is an existing object of the same name, this object will replace it. If bIsPermanent is false and there is an existing permanent binding, the permanent binding will be restored when the temporary one is removed.

Object

The object instance.

bIsPermanent

If true, the object will be visible to all pages loaded through this browser widget, otherwise, it will be deleted when navigating away from the current page. Non-permanent bindings should be registered from inside an OnLoadStarted event handler in order to be available before JS code starts loading.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss