self:is_type
Client
Checks whether the instance belongs to the specified type
Syntax
local result = self:is_type(
name
)Parameters
| Type | Name | Description |
|---|---|---|
string | name | Type to check against |
Returns
| Type | Name | Description |
|---|---|---|
bool | result | true if the instance matches the given type, false otherwise |
Examples
local wv = webview.create()
engine.print("info", wv:is_type("webview")) -- true
engine.print("info", wv:is_type("rendertarget")) -- false