Class WebView
Inheritance
BaseObject
WebView
Inherited Members
BaseObject.type
BaseObject.valid
BaseObject.id
BaseObject.destroy
BaseObject.getMetaDataKeys
BaseObject.getSyncedMeta
BaseObject.hasSyncedMeta
BaseObject.getSyncedMetaKeys
BaseObject.refCount
Package: @altmp/altv-types
Syntax
class WebView extends BaseObject
Constructors
|
Improve this Doc
View Source
WebView(string, boolean)
Declaration
WebView(url: string, isOverlay?: boolean): WebView
Parameters
Type |
Name |
Description |
string |
url |
|
boolean |
isOverlay |
|
|
Improve this Doc
View Source
WebView(string, number, string)
Declaration
WebView(url: string, propHash: number, targetTexture: string): WebView
Parameters
Type |
Name |
Description |
string |
url |
|
number |
propHash |
|
string |
targetTexture |
|
Properties
|
Improve this Doc
View Source
isVisible
Declaration
public isVisible: boolean
Property Value
|
Improve this Doc
View Source
url
Declaration
Property Value
|
Improve this Doc
View Source
all
Declaration
public readonly static all: readonly WebView[]
Property Value
Type |
Description |
readonly WebView[] |
|
|
Improve this Doc
View Source
count
Declaration
public readonly static count: number
Property Value
|
Improve this Doc
View Source
gpuAccelerationActive
Declaration
public readonly static gpuAccelerationActive: boolean
Property Value
|
Improve this Doc
View Source
isOverlay
Declaration
public readonly isOverlay: boolean
Property Value
|
Improve this Doc
View Source
isReady
Declaration
public readonly isReady: boolean
Property Value
|
Improve this Doc
View Source
focused
Declaration
Property Value
|
Improve this Doc
View Source
size
Declaration
Property Value
|
Improve this Doc
View Source
pos
Declaration
public readonly pos: Vector2
Property Value
Methods
|
Improve this Doc
View Source
getByID(number)
Declaration
public static getByID(id: number): null | WebView
Parameters
Type |
Name |
Description |
number |
id |
|
Returns
|
Improve this Doc
View Source
emit(string, any[])
Declaration
public emit(eventName: string, ...args: any[]): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
any[] |
args |
|
|
Improve this Doc
View Source
off(string, (...args: any[]) => void)
Declaration
public off(eventName: string, listener: (...args: any[]) => void): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
(...args: any[]) => void |
listener |
|
|
Improve this Doc
View Source
on(string, (...args: any[]) => void)
Declaration
public on(eventName: string, listener: (...args: any[]) => void): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
(...args: any[]) => void |
listener |
|
|
Improve this Doc
View Source
on("load", () => void)
Declaration
public on(eventName: "load", listener: () => void): void
Parameters
Type |
Name |
Description |
"load" |
eventName |
|
() => void |
listener |
|
|
Improve this Doc
View Source
once(string, (...args: any[]) => void)
Declaration
public once(eventName: string, listener: (...args: any[]) => void): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
(...args: any[]) => void |
listener |
|
|
Improve this Doc
View Source
focus()
Declaration
|
Improve this Doc
View Source
unfocus()
Declaration
|
Improve this Doc
View Source
getEventListeners(null | string)
Declaration
public getEventListeners(eventName: null | string): readonly (...args: any[]) => void[]
Parameters
Type |
Name |
Description |
null | string |
eventName |
|
Returns
Type |
Description |
readonly (...args: any[]) => void[] |
|
|
Improve this Doc
View Source
Declaration
public setExtraHeader(header: string, value: string): void
Parameters
Type |
Name |
Description |
string |
header |
|
string |
value |
|
|
Improve this Doc
View Source
setZoomLevel(number)
Declaration
public setZoomLevel(value: number): void
Parameters
Type |
Name |
Description |
number |
value |
|
|
Improve this Doc
View Source
addOutput(AudioOutput)
Declaration
public addOutput(output: AudioOutput): void
Parameters
|
Improve this Doc
View Source
removeOutput(AudioOutput)
Declaration
public removeOutput(output: AudioOutput): void
Parameters
|
Improve this Doc
View Source
getOutputs()
Declaration
public getOutputs(): readonly number | AudioOutput[]
Returns
|
Improve this Doc
View Source
reload(boolean)
Declaration
public reload(ignoreCache?: boolean): void
Parameters
Type |
Name |
Description |
boolean |
ignoreCache |
|
|
Improve this Doc
View Source
Declaration
public deleteMeta(key: string): void
Parameters
Type |
Name |
Description |
string |
key |
|
|
Improve this Doc
View Source
Declaration
public deleteMeta<K extends never>(key: K): void
Parameters
Type |
Name |
Description |
K |
key |
|
|
Improve this Doc
View Source
Declaration
public hasMeta(key: string): boolean
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public hasMeta<K extends never>(key: K): boolean
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getMeta<K extends string>(key: Exclude<K, never>): unknown
Parameters
Type |
Name |
Description |
Exclude<K, never> |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getMeta<K extends never>(key: K): undefined | ICustomWebViewMeta[K]
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getMeta<V extends unknown>(key: string): undefined | V
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
Type |
Description |
undefined | V |
|
|
Improve this Doc
View Source
Declaration
public setMeta<K extends string>(key: K, value: InterfaceValueByKey<ICustomWebViewMeta, K, unknown, void>): void
Parameters
Type |
Name |
Description |
K |
key |
|
InterfaceValueByKey<ICustomWebViewMeta, K, unknown, void> |
value |
|
|
Improve this Doc
View Source
Declaration
public setMeta<K extends never>(key: K, value: ICustomWebViewMeta[K]): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta<V extends unknown, K extends string>(key: K, value: InterfaceValueByKey<ICustomWebViewMeta, K, V, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta(values: MetaValues<ICustomWebViewMeta>): void
Parameters