WebAssembly

Overview

Helper class to access the webassembly runtime.

Location

 

constructor  protected

Default constructor.

 

constructor

 

WebAssembly()

 

init()

 

WebAssembly()

AjaxRequest

Do an AJAX request to the given url and return the result as string.

 

class method AjaxRequest(url: String): String

 

static String AjaxRequest(String url)

 

static func AjaxRequest(_ url: String) -> String

 

static String AjaxRequest(String url)

Parameters:

  • url:

AjaxRequestBinary

Do an AJAX request to the given url and return the result as binary.

 

class method AjaxRequestBinary(url: String): array of Byte

 

static Byte[] AjaxRequestBinary(String url)

 

static func AjaxRequestBinary(_ url: String) -> Byte...

 

static Byte[] AjaxRequestBinary(String url)

Parameters:

  • url:

ClearInterval

Stops an interval timer.

 

class method ClearInterval(aVal: Int32)

 

static void ClearInterval(Int32 aVal)

 

static func ClearInterval(_ aVal: Int32)

 

static void ClearInterval(Int32 aVal)

Parameters:

  • aVal:

CreateArray

Create a new array.

 

class method CreateArray: dynamic

 

static dynamic CreateArray()

 

static func CreateArray() -> dynamic

 

static dynamic CreateArray()

CreateElement

Create a new html element by name.

 

class method CreateElement(aName: String): dynamic

 

static dynamic CreateElement(String aName)

 

static func CreateElement(_ aName: String) -> dynamic

 

static dynamic CreateElement(String aName)

Parameters:

  • aName:

CreateHandle

Creates a handle for a given object.

 

class method CreateHandle(aVal: Object; StringAsObject: Boolean): IntPtr

 

static IntPtr CreateHandle(Object aVal, Boolean StringAsObject)

 

static func CreateHandle(_ aVal: Object, _ StringAsObject: Boolean) -> IntPtr

 

static IntPtr CreateHandle(Object aVal, Boolean StringAsObject)

Parameters:

  • aVal:
  • StringAsObject:

CreateObject

Create a new empty javascript object.

 

class method CreateObject: dynamic

 

static dynamic CreateObject()

 

static func CreateObject() -> dynamic

 

static dynamic CreateObject()

CreateProxy

Create a proxy for a given type.

 

class method CreateProxy(o: Object): EcmaScriptObject

 

static EcmaScriptObject CreateProxy(Object o)

 

static func CreateProxy(_ o: Object) -> EcmaScriptObject

 

static EcmaScriptObject CreateProxy(Object o)

Parameters:

  • o:

CreateTextNode

Create an html text node.

 

class method CreateTextNode(aName: String): dynamic

 

static dynamic CreateTextNode(String aName)

 

static func CreateTextNode(_ aName: String) -> dynamic

 

static dynamic CreateTextNode(String aName)

Parameters:

  • aName:

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Eval

Does a javascript eval and returns the result.

 

class method Eval(s: String): dynamic

 

static dynamic Eval(String s)

 

static func Eval(_ s: String) -> dynamic

 

static dynamic Eval(String s)

Parameters:

  • s:

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetElementById

Returns an element by id value.

 

class method GetElementById(id: String): dynamic

 

static dynamic GetElementById(String id)

 

static func GetElementById(_ id: String) -> dynamic

 

static dynamic GetElementById(String id)

Parameters:

  • id:

GetElementByName

Returns an element by name.

 

class method GetElementByName(id: String): dynamic

 

static dynamic GetElementByName(String id)

 

static func GetElementByName(_ id: String) -> dynamic

 

static dynamic GetElementByName(String id)

Parameters:

  • id:

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetObjectForHandle

Returns the object value given a handle.

 

class method GetObjectForHandle(aHandle: IntPtr): Object

 

static Object GetObjectForHandle(IntPtr aHandle)

 

static func GetObjectForHandle(_ aHandle: IntPtr) -> Object

 

static Object GetObjectForHandle(IntPtr aHandle)

Parameters:

  • aHandle:

GetStringFromHandle

Returns a string, given a handle.

 

class method GetStringFromHandle(handle: Int32; aFree: Boolean): String

 

static String GetStringFromHandle(Int32 handle, Boolean aFree)

 

static func GetStringFromHandle(_ handle: Int32, _ aFree: Boolean) -> String

 

static String GetStringFromHandle(Int32 handle, Boolean aFree)

Parameters:

  • handle:
  • aFree:

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

GetWindowObject

Returns the Window object.

 

class method GetWindowObject: dynamic

 

static dynamic GetWindowObject()

 

static func GetWindowObject() -> dynamic

 

static dynamic GetWindowObject()

Global

Returns the Global object.

 

class property Global: dynamic read write;

 

class dynamic Global { get; set; }

 

static var Global: dynamic { get{} set{} }

 

class dynamic Global { __get; __set; }

InvokeMethod

Helper invoke a method with a given set of parameters.

 

class method InvokeMethod(aPtr: ^void; params args: array of Object): Object

 

static Object InvokeMethod(void* aPtr, params Object[] args)

 

static func InvokeMethod(_ aPtr: UnsafeMutablePointer<void>, _ args: Object...) -> Object

 

static Object InvokeMethod(void* aPtr, Object[]... args)

Parameters:

  • aPtr:
  • args:

NewWebSocket

 

class method NewWebSocket(s: String): dynamic

 

static dynamic NewWebSocket(String s)

 

static func NewWebSocket(_ s: String) -> dynamic

 

static dynamic NewWebSocket(String s)

Parameters:

  • s:

NewXMLHttpRequest

 

class method NewXMLHttpRequest: dynamic

 

static dynamic NewXMLHttpRequest()

 

static func NewXMLHttpRequest() -> dynamic

 

static dynamic NewXMLHttpRequest()

Object

Returns the javascript Object type /function.

 

class property Object: dynamic read write;

 

class dynamic Object { get; set; }

 

static var Object: dynamic { get{} set{} }

 

class dynamic Object { __get; __set; }

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

ReleaseProxy

Release a proxy.

 

class method ReleaseProxy(o: EcmaScriptObject)

 

static void ReleaseProxy(EcmaScriptObject o)

 

static func ReleaseProxy(_ o: EcmaScriptObject)

 

static void ReleaseProxy(EcmaScriptObject o)

Parameters:

  • o:

SetInterval

Creates a new javascript interval (triggers the delegate every aTimeout msec).

 

class method SetInterval(aFN: WebAssemblyDelegate; aTimeOut: Int32): Int32

 

static Int32 SetInterval(WebAssemblyDelegate aFN, Int32 aTimeOut)

 

static func SetInterval(_ aFN: WebAssemblyDelegate, _ aTimeOut: Int32) -> Int32

 

static Int32 SetInterval(WebAssemblyDelegate aFN, Int32 aTimeOut)

Parameters:

  • aFN:
  • aTimeOut:

SetTimeout

Creates a new javascript timeout (triggers the delegate once at aTimeout msec).

 

class method SetTimeout(aFN: WebAssemblyDelegate; aTimeOut: Int32): Int32

 

static Int32 SetTimeout(WebAssemblyDelegate aFN, Int32 aTimeOut)

 

static func SetTimeout(_ aFN: WebAssemblyDelegate, _ aTimeOut: Int32) -> Int32

 

static Int32 SetTimeout(WebAssemblyDelegate aFN, Int32 aTimeOut)

Parameters:

  • aFN:
  • aTimeOut:

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

Unwrap

Internal api.

 

class method Unwrap(o: IntPtr): IntPtr

 

static IntPtr Unwrap(IntPtr o)

 

static func Unwrap(_ o: IntPtr) -> IntPtr

 

static IntPtr Unwrap(IntPtr o)

Parameters:

  • o:

UnwrapCall

Internal api.

 

class method UnwrapCall(aType: Type; aVal: Object): Object

 

static Object UnwrapCall(Type aType, Object aVal)

 

static func UnwrapCall(_ aType: Type, _ aVal: Object) -> Object

 

static Object UnwrapCall(Type aType, Object aVal)

Parameters:

  • aType:
  • aVal:

Wrap

Internal api.

 

class method Wrap(o: IntPtr): IntPtr

 

static IntPtr Wrap(IntPtr o)

 

static func Wrap(_ o: IntPtr) -> IntPtr

 

static IntPtr Wrap(IntPtr o)

Parameters:

  • o:

 

Global

Returns the Global object.

 

class property Global: dynamic read write;

 

class dynamic Global { get; set; }

 

static var Global: dynamic { get{} set{} }

 

class dynamic Global { __get; __set; }

Object

Returns the javascript Object type /function.

 

class property Object: dynamic read write;

 

class dynamic Object { get; set; }

 

static var Object: dynamic { get{} set{} }

 

class dynamic Object { __get; __set; }

 

AjaxRequest

Do an AJAX request to the given url and return the result as string.

 

class method AjaxRequest(url: String): String

 

static String AjaxRequest(String url)

 

static func AjaxRequest(_ url: String) -> String

 

static String AjaxRequest(String url)

Parameters:

  • url:

AjaxRequestBinary

Do an AJAX request to the given url and return the result as binary.

 

class method AjaxRequestBinary(url: String): array of Byte

 

static Byte[] AjaxRequestBinary(String url)

 

static func AjaxRequestBinary(_ url: String) -> Byte...

 

static Byte[] AjaxRequestBinary(String url)

Parameters:

  • url:

ClearInterval

Stops an interval timer.

 

class method ClearInterval(aVal: Int32)

 

static void ClearInterval(Int32 aVal)

 

static func ClearInterval(_ aVal: Int32)

 

static void ClearInterval(Int32 aVal)

Parameters:

  • aVal:

CreateArray

Create a new array.

 

class method CreateArray: dynamic

 

static dynamic CreateArray()

 

static func CreateArray() -> dynamic

 

static dynamic CreateArray()

CreateElement

Create a new html element by name.

 

class method CreateElement(aName: String): dynamic

 

static dynamic CreateElement(String aName)

 

static func CreateElement(_ aName: String) -> dynamic

 

static dynamic CreateElement(String aName)

Parameters:

  • aName:

CreateHandle

Creates a handle for a given object.

 

class method CreateHandle(aVal: Object; StringAsObject: Boolean): IntPtr

 

static IntPtr CreateHandle(Object aVal, Boolean StringAsObject)

 

static func CreateHandle(_ aVal: Object, _ StringAsObject: Boolean) -> IntPtr

 

static IntPtr CreateHandle(Object aVal, Boolean StringAsObject)

Parameters:

  • aVal:
  • StringAsObject:

CreateObject

Create a new empty javascript object.

 

class method CreateObject: dynamic

 

static dynamic CreateObject()

 

static func CreateObject() -> dynamic

 

static dynamic CreateObject()

CreateProxy

Create a proxy for a given type.

 

class method CreateProxy(o: Object): EcmaScriptObject

 

static EcmaScriptObject CreateProxy(Object o)

 

static func CreateProxy(_ o: Object) -> EcmaScriptObject

 

static EcmaScriptObject CreateProxy(Object o)

Parameters:

  • o:

CreateTextNode

Create an html text node.

 

class method CreateTextNode(aName: String): dynamic

 

static dynamic CreateTextNode(String aName)

 

static func CreateTextNode(_ aName: String) -> dynamic

 

static dynamic CreateTextNode(String aName)

Parameters:

  • aName:

Eval

Does a javascript eval and returns the result.

 

class method Eval(s: String): dynamic

 

static dynamic Eval(String s)

 

static func Eval(_ s: String) -> dynamic

 

static dynamic Eval(String s)

Parameters:

  • s:

GetElementById

Returns an element by id value.

 

class method GetElementById(id: String): dynamic

 

static dynamic GetElementById(String id)

 

static func GetElementById(_ id: String) -> dynamic

 

static dynamic GetElementById(String id)

Parameters:

  • id:

GetElementByName

Returns an element by name.

 

class method GetElementByName(id: String): dynamic

 

static dynamic GetElementByName(String id)

 

static func GetElementByName(_ id: String) -> dynamic

 

static dynamic GetElementByName(String id)

Parameters:

  • id:

GetObjectForHandle

Returns the object value given a handle.

 

class method GetObjectForHandle(aHandle: IntPtr): Object

 

static Object GetObjectForHandle(IntPtr aHandle)

 

static func GetObjectForHandle(_ aHandle: IntPtr) -> Object

 

static Object GetObjectForHandle(IntPtr aHandle)

Parameters:

  • aHandle:

GetStringFromHandle

Returns a string, given a handle.

 

class method GetStringFromHandle(handle: Int32; aFree: Boolean): String

 

static String GetStringFromHandle(Int32 handle, Boolean aFree)

 

static func GetStringFromHandle(_ handle: Int32, _ aFree: Boolean) -> String

 

static String GetStringFromHandle(Int32 handle, Boolean aFree)

Parameters:

  • handle:
  • aFree:

GetWindowObject

Returns the Window object.

 

class method GetWindowObject: dynamic

 

static dynamic GetWindowObject()

 

static func GetWindowObject() -> dynamic

 

static dynamic GetWindowObject()

InvokeMethod

Helper invoke a method with a given set of parameters.

 

class method InvokeMethod(aPtr: ^void; params args: array of Object): Object

 

static Object InvokeMethod(void* aPtr, params Object[] args)

 

static func InvokeMethod(_ aPtr: UnsafeMutablePointer<void>, _ args: Object...) -> Object

 

static Object InvokeMethod(void* aPtr, Object[]... args)

Parameters:

  • aPtr:
  • args:

NewWebSocket

 

class method NewWebSocket(s: String): dynamic

 

static dynamic NewWebSocket(String s)

 

static func NewWebSocket(_ s: String) -> dynamic

 

static dynamic NewWebSocket(String s)

Parameters:

  • s:

NewXMLHttpRequest

 

class method NewXMLHttpRequest: dynamic

 

static dynamic NewXMLHttpRequest()

 

static func NewXMLHttpRequest() -> dynamic

 

static dynamic NewXMLHttpRequest()

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

ReleaseProxy

Release a proxy.

 

class method ReleaseProxy(o: EcmaScriptObject)

 

static void ReleaseProxy(EcmaScriptObject o)

 

static func ReleaseProxy(_ o: EcmaScriptObject)

 

static void ReleaseProxy(EcmaScriptObject o)

Parameters:

  • o:

SetInterval

Creates a new javascript interval (triggers the delegate every aTimeout msec).

 

class method SetInterval(aFN: WebAssemblyDelegate; aTimeOut: Int32): Int32

 

static Int32 SetInterval(WebAssemblyDelegate aFN, Int32 aTimeOut)

 

static func SetInterval(_ aFN: WebAssemblyDelegate, _ aTimeOut: Int32) -> Int32

 

static Int32 SetInterval(WebAssemblyDelegate aFN, Int32 aTimeOut)

Parameters:

  • aFN:
  • aTimeOut:

SetTimeout

Creates a new javascript timeout (triggers the delegate once at aTimeout msec).

 

class method SetTimeout(aFN: WebAssemblyDelegate; aTimeOut: Int32): Int32

 

static Int32 SetTimeout(WebAssemblyDelegate aFN, Int32 aTimeOut)

 

static func SetTimeout(_ aFN: WebAssemblyDelegate, _ aTimeOut: Int32) -> Int32

 

static Int32 SetTimeout(WebAssemblyDelegate aFN, Int32 aTimeOut)

Parameters:

  • aFN:
  • aTimeOut:

Unwrap

Internal api.

 

class method Unwrap(o: IntPtr): IntPtr

 

static IntPtr Unwrap(IntPtr o)

 

static func Unwrap(_ o: IntPtr) -> IntPtr

 

static IntPtr Unwrap(IntPtr o)

Parameters:

  • o:

UnwrapCall

Internal api.

 

class method UnwrapCall(aType: Type; aVal: Object): Object

 

static Object UnwrapCall(Type aType, Object aVal)

 

static func UnwrapCall(_ aType: Type, _ aVal: Object) -> Object

 

static Object UnwrapCall(Type aType, Object aVal)

Parameters:

  • aType:
  • aVal:

Wrap

Internal api.

 

class method Wrap(o: IntPtr): IntPtr

 

static IntPtr Wrap(IntPtr o)

 

static func Wrap(_ o: IntPtr) -> IntPtr

 

static IntPtr Wrap(IntPtr o)

Parameters:

  • o:

 

constructor  protected

Default constructor.

 

constructor

 

WebAssembly()

 

init()

 

WebAssembly()

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()