public class BrowserComponent.JSProxy
- Object
- BrowserComponent.JSProxy
A thin wrapper around a Javascript variable that makes it easier to
call methods on that variable.
Methods
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
timeoutint- The timeout in ms
methodString- The method name.
argsObject[]- Arguments to pass to the method.
callbackSuccessCallback<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
methodString- The method name.
argsObject[]- Arguments to pass to the method.
callbackSuccessCallback<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
timeoutint- The timeout in ms
methodString- The method name.
argsObject[]- 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
methodString- The method name.
argsObject[]- 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
timeoutint- Timeout in ms
propertyString- The property name.
callbackSuccessCallback<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
propertyString- The property name.
callbackSuccessCallback<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
timeoutint- Timeout in ms
propertiesCollection<String>- List of property names to retrieve.
callbackSuccessCallback<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
timeoutint- The timeout in ms
propertyString- 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
propertyString- 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
timeoutint- The timeout in ms
propertiesCollection<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
timeoutint- The timeout in ms
propertyString- The property name.
valueObject- The property value.
set
public void set(String property, Object value)Sets a property.
Parameters
propertyString- The property name.
valueObject- 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
timeoutint- The timeout in ms.
propertyString- The property name to set.
valueObject- The property value.
callbackSuccessCallback<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
propertyString- The property name to set.
valueObject- The property value.
callbackSuccessCallback<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
timeoutint- The timeout in ms
propertiesMap<String, Object>- The properties to set.
callbackSuccessCallback<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
propertiesMap<String, Object>- The properties to set.
callbackSuccessCallback<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
timeoutint- Timeout in ms
propertiesMap<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
propertiesMap<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
timeoutint- The timeout in ms.
propertyString- The property name to set.
valueObject- 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
propertyString- The property name to set.
valueObject- The value to set.