Asset

Asset is a quasi-object that represents native assets in script.

In a nutshell asset is non-extendable object with fixed set of methods and properties that are defined completely in native code.

The Asset is a namespace that defines following methods:

Constants

N/A

Properties

N/A

Methods

typeOf
( obj: asset ) : symbol

Returns type name that was defined on native side. In order to test native entity for particular type use this:

if( obj instanceof Asset && Asset.typeOf(obj) == #Recordset)
  ...
dispose 
( obj: asset ) returns : true | false

Disposes (frees) native object. This will lead to invocation of native passport->asset_release(asset) function.

hasMethod
( obj: asset, name: symbol ) returns : true | false

Returns true if the asset has native method with the name.

hasProperty
( obj: asset, name: symbol ) returns : true | false

Returns true if the asset has native property with the name.