public class BrowserComponent.JSProxy

  1. Object
  2. BrowserComponent.JSProxy
A thin wrapper around a Javascript variable that makes it easier to call methods on that variable.

Methods

public void call(int timeout, String method, Object[] args, SuccessCallback<BrowserComponent.JSRef> callback)Calls a method on this javascript object.
public void call(String method, Object[] args, SuccessCallback<BrowserComponent.JSRef> callback)Calls a method on this javascript object.
public BrowserComponent.JSRef callAndWait(int timeout, String method, Object[] args)Calls method on this javascript object and waits for the result using invokeAndBlock.
public BrowserComponent.JSRef callAndWait(String method, Object[] args)Calls method on this javascript object and waits for the result using invokeAndBlock.
public void get(int timeout, String property, SuccessCallback<BrowserComponent.JSRef> callback)Gets a property of this javascript object.
public void get(String property, SuccessCallback<BrowserComponent.JSRef> callback)Gets a property of this javascript object.
public void get(int timeout, Collection<String> properties, SuccessCallback<Map<String, BrowserComponent.JSRef>> callback)Gets multiple properties as a batch.
public void get(Collection<String> properties, SuccessCallback<Map<String, BrowserComponent.JSRef>> callback)Gets a property of this javascript object and waits for the result using invokeAndBlock.
public BrowserComponent.JSRef getAndWait(int timeout, String property)Gets a property of this javascript object and waits for the result using invokeAndBlock.
public BrowserComponent.JSRef getAndWait(String property)Gets a property of this javascript object and waits for the result using invokeAndBlock.
public Map<String, BrowserComponent.JSRef> getAndWait(int timeout, Collection<String> properties)Gets multiple properties on this object in a batch.
public Map<String, BrowserComponent.JSRef> getAndWait(Collection<String> properties)Gets multiple properties on this object in a batch.
public void set(int timeout, String property, Object value)Sets a property.
public void set(String property, Object value)Sets a property.
public void set(int timeout, String property, Object value, SuccessCallback<BrowserComponent.JSRef> callback)Sets a property on this javascript object.
public void set(String property, Object value, SuccessCallback<BrowserComponent.JSRef> callback)Sets a property on this javascript object.
public void set(int timeout, Map<String, Object> properties, SuccessCallback<BrowserComponent.JSRef> callback)Sets multiple properties in a single batch.
public void set(Map<String, Object> properties, SuccessCallback<BrowserComponent.JSRef> callback)Sets multiple properties in a single batch.
public void setAndWait(int timeout, Map<String, Object> properties)Sets multiple properties in a single batch.
public void setAndWait(Map<String, Object> properties)Sets multiple properties in a single batch.
public void setAndWait(int timeout, String property, Object value)Sets a property on this javascript object and waits for it to complete using invokeAndBlock.
public void setAndWait(String property, Object value)Sets a property on this javascript object and waits for it to complete using invokeAndBlock.

Inherited methods

Method details

call

public void call(int timeout, String method, Object[] args, SuccessCallback<BrowserComponent.JSRef> callback)
Calls a method on this javascript object.

Parameters

timeout int
The timeout in ms
method String
The method name.
args Object[]
Arguments to pass to the method.
callback SuccessCallback<BrowserComponent.JSRef>
Callback with the result of the method.

call

public void call(String method, Object[] args, SuccessCallback<BrowserComponent.JSRef> callback)
Calls a method on this javascript object.

Parameters

method String
The method name.
args Object[]
Arguments to pass to the method.
callback SuccessCallback<BrowserComponent.JSRef>
Callback with the result of the method.

callAndWait

public BrowserComponent.JSRef callAndWait(int timeout, String method, Object[] args)
Calls method on this javascript object and waits for the result using invokeAndBlock.

Parameters

timeout int
The timeout in ms
method String
The method name.
args Object[]
Arguments for the method.

Returns

JSRef with the result of the method call.

callAndWait

public BrowserComponent.JSRef callAndWait(String method, Object[] args)
Calls method on this javascript object and waits for the result using invokeAndBlock.

Parameters

method String
The method name.
args Object[]
Arguments for the method.

Returns

JSRef with the result of the method call.

get

public void get(int timeout, String property, SuccessCallback<BrowserComponent.JSRef> callback)
Gets a property of this javascript object.

Parameters

timeout int
Timeout in ms
property String
The property name.
callback SuccessCallback<BrowserComponent.JSRef>
Callback with the property value.

get

public void get(String property, SuccessCallback<BrowserComponent.JSRef> callback)
Gets a property of this javascript object.

Parameters

property String
The property name.
callback SuccessCallback<BrowserComponent.JSRef>
Callback with the property value.

get

public void get(int timeout, Collection<String> properties, SuccessCallback<Map<String, BrowserComponent.JSRef>> callback)
Gets multiple properties as a batch.

Parameters

timeout int
Timeout in ms
properties Collection<String>
List of property names to retrieve.
callback SuccessCallback<Map<String, BrowserComponent.JSRef>>
Not documented.

get

public void get(Collection<String> properties, SuccessCallback<Map<String, BrowserComponent.JSRef>> callback)
Gets a property of this javascript object and waits for the result using invokeAndBlock.

Returns

The property value.

getAndWait

public BrowserComponent.JSRef getAndWait(int timeout, String property)
Gets a property of this javascript object and waits for the result using invokeAndBlock.

Parameters

timeout int
The timeout in ms
property String
The property to retrieve.

Returns

The property value.

getAndWait

public BrowserComponent.JSRef getAndWait(String property)
Gets a property of this javascript object and waits for the result using invokeAndBlock.

Parameters

property String
The property to retrieve.

Returns

The property value.

getAndWait

public Map<String, BrowserComponent.JSRef> getAndWait(int timeout, Collection<String> properties)
Gets multiple properties on this object in a batch.

Parameters

timeout int
The timeout in ms
properties Collection<String>
The property names to get.

getAndWait

public Map<String, BrowserComponent.JSRef> getAndWait(Collection<String> properties)
Gets multiple properties on this object in a batch.

set

public void set(int timeout, String property, Object value)
Sets a property.

Parameters

timeout int
The timeout in ms
property String
The property name.
value Object
The property value.

set

public void set(String property, Object value)
Sets a property.

Parameters

property String
The property name.
value Object
The property value.

set

public void set(int timeout, String property, Object value, SuccessCallback<BrowserComponent.JSRef> callback)
Sets a property on this javascript object.

Parameters

timeout int
The timeout in ms.
property String
The property name to set.
value Object
The property value.
callback SuccessCallback<BrowserComponent.JSRef>
Callback which is called when complete

set

public void set(String property, Object value, SuccessCallback<BrowserComponent.JSRef> callback)
Sets a property on this javascript object.

Parameters

property String
The property name to set.
value Object
The property value.
callback SuccessCallback<BrowserComponent.JSRef>
Callback which is called when complete

set

public void set(int timeout, Map<String, Object> properties, SuccessCallback<BrowserComponent.JSRef> callback)
Sets multiple properties in a single batch.

Parameters

timeout int
The timeout in ms
properties Map<String, Object>
The properties to set.
callback SuccessCallback<BrowserComponent.JSRef>
Callback called when operation is completed.

set

public void set(Map<String, Object> properties, SuccessCallback<BrowserComponent.JSRef> callback)
Sets multiple properties in a single batch.

Parameters

properties Map<String, Object>
The properties to set.
callback SuccessCallback<BrowserComponent.JSRef>
Callback called when operation is completed.

setAndWait

public void setAndWait(int timeout, Map<String, Object> properties)
Sets multiple properties in a single batch.

Parameters

timeout int
Timeout in ms
properties Map<String, Object>
The properties to set on this object.

setAndWait

public void setAndWait(Map<String, Object> properties)
Sets multiple properties in a single batch.

Parameters

properties Map<String, Object>
The properties to set on this object.

setAndWait

public void setAndWait(int timeout, String property, Object value)
Sets a property on this javascript object and waits for it to complete using invokeAndBlock.

Parameters

timeout int
The timeout in ms.
property String
The property name to set.
value Object
The value to set.

setAndWait

public void setAndWait(String property, Object value)
Sets a property on this javascript object and waits for it to complete using invokeAndBlock.

Parameters

property String
The property name to set.
value Object
The value to set.