Sinespace Client  2023.2.17543
Client-side scripting for Sinespace
SineSpace.Scripting.Components.SBrowserSurface Class Reference
Inheritance diagram for SineSpace.Scripting.Components.SBrowserSurface:
ScriptClassComponent< BrowserSurfaceBaseInternal >

Public Member Functions

void RequestURLPermission (Action granted, Action denied)
 Requests access from the user to read their current URL on this browser surface. More...
 
void RequestURLPermission (Closure granted, Closure denied)
 Requests access from the user to read their current URL on this browser surface. More...
 
void SetURL (string url)
 Sets the URL for the browser frame, and navigates to it More...
 
void Back ()
 Equivilent to hitting the 'back' button within the browser More...
 
void Forward ()
 Equivilent to hitting the 'forward' button within the browser More...
 
void Reload ()
 Refreshes and reloads the current webpage More...
 
void RegisterFunction (string name, Closure function)
 Registers a JS function in the browser. The function name must start with the characters "sinespace__". More...
 
void CallFunction (string name, string argument)
 Calls a JS function in the browser with a single argument. The function name must begin with the characters "sinespace__". More...
 
void OnURLChanged (Action e)
 
void OnURLChanged (Closure e)
 

Properties

bool URLPermissionGranted [get]
 Returns true if user has granted permission to access URL information on this browser surface. More...
 
string URL [get]
 Returns a string containing the URL the browser is currently displaying. Returns null if permission to do so has not been granted by the user with RequestURLPermission() More...
 
bool Networked [get, set]
 Should changes to this browser be streamed to other clients within the area? More...
 
bool Muted [get, set]
 
bool CanGoBack [get]
 
bool CanGoForward [get]
 
bool EnableInput [get, set]
 
float Zoom [get, set]
 
- Properties inherited from ScriptClassComponent< BrowserSurfaceBaseInternal >
SGameObject GameObject [get]
 Return the GameObject which component added. More...
 

Member Function Documentation

◆ Back()

void SineSpace.Scripting.Components.SBrowserSurface.Back ( )

Equivilent to hitting the 'back' button within the browser

◆ CallFunction()

void SineSpace.Scripting.Components.SBrowserSurface.CallFunction ( string  name,
string  argument 
)

Calls a JS function in the browser with a single argument. The function name must begin with the characters "sinespace__".

Parameters
name
argument

◆ Forward()

void SineSpace.Scripting.Components.SBrowserSurface.Forward ( )

Equivilent to hitting the 'forward' button within the browser

◆ OnURLChanged() [1/2]

void SineSpace.Scripting.Components.SBrowserSurface.OnURLChanged ( Action  e)

◆ OnURLChanged() [2/2]

void SineSpace.Scripting.Components.SBrowserSurface.OnURLChanged ( Closure  e)

◆ RegisterFunction()

void SineSpace.Scripting.Components.SBrowserSurface.RegisterFunction ( string  name,
Closure  function 
)

Registers a JS function in the browser. The function name must start with the characters "sinespace__".

Parameters
name
function

◆ Reload()

void SineSpace.Scripting.Components.SBrowserSurface.Reload ( )

Refreshes and reloads the current webpage

◆ RequestURLPermission() [1/2]

void SineSpace.Scripting.Components.SBrowserSurface.RequestURLPermission ( Action  granted,
Action  denied 
)

Requests access from the user to read their current URL on this browser surface.

Parameters
grantedFunction to execute if user accepts.
deniedFunction to execute if user refuses.

◆ RequestURLPermission() [2/2]

void SineSpace.Scripting.Components.SBrowserSurface.RequestURLPermission ( Closure  granted,
Closure  denied 
)

Requests access from the user to read their current URL on this browser surface.

Parameters
grantedFunction to execute if user accepts.
deniedFunction to execute if user refuses.

◆ SetURL()

void SineSpace.Scripting.Components.SBrowserSurface.SetURL ( string  url)

Sets the URL for the browser frame, and navigates to it

Parameters
urlA standard URL recognised by Chromium; e.g. https://www.foo.bar

Property Documentation

◆ CanGoBack

bool SineSpace.Scripting.Components.SBrowserSurface.CanGoBack
get

◆ CanGoForward

bool SineSpace.Scripting.Components.SBrowserSurface.CanGoForward
get

◆ EnableInput

bool SineSpace.Scripting.Components.SBrowserSurface.EnableInput
getset

◆ Muted

bool SineSpace.Scripting.Components.SBrowserSurface.Muted
getset

◆ Networked

bool SineSpace.Scripting.Components.SBrowserSurface.Networked
getset

Should changes to this browser be streamed to other clients within the area?

◆ URL

string SineSpace.Scripting.Components.SBrowserSurface.URL
get

Returns a string containing the URL the browser is currently displaying. Returns null if permission to do so has not been granted by the user with RequestURLPermission()

◆ URLPermissionGranted

bool SineSpace.Scripting.Components.SBrowserSurface.URLPermissionGranted
get

Returns true if user has granted permission to access URL information on this browser surface.

◆ Zoom

float SineSpace.Scripting.Components.SBrowserSurface.Zoom
getset