متد ها
console
متد ها:
| Method | Type | inputs | Description |
| log | void | message: any | متن داده شده را در صفحه ی دیباگ نمایش می دهد |
| clear | void | - | متن های صفحه ی دیباگ را پاک می کند |
Appsan
متد ها:
| Method | Type | inputs | Description |
| setProperty | void | elementId: string, propertyName: string, propertyValue | تغییر مقدار پراپرتی یک المان |
| setVariable | void | variableId: string, variableValue: string | تغییر مقدار یک variable |
| runUpdate | void | updateJson: string | اجرای update |
| runAction | void | actions: string | اجرای action |
| findElementById | {id, value, ...} | id: string | گرفتن یک المان با id |
HTTPClient
| Method | Type | Inputs |
| get | {subscribe: (success(), error(), finally()) => void} | url: string, options: {headers: {name: value,...}} |
| post | {subscribe: (success(), error(), finally()) => void} | url: string, body: string | Blob, options: {headers: {name: value,...}} |
| put | {subscribe: (success(), error(), finally()) => void} | url: string, body: string | Blob, options: {headers: {name: value,...}} |
| delete | {subscribe: (success(), error(), finally()) => void} | url: string, options: {headers: {name: value,...}} |
| patch | {subscribe: (success(), error(), finally()) => void} |
url: string, body: string | Blob, options: {headers: {name: value,...}} |
FormData
| Method | Type | Inputs |
| constructor | FormData | - |
| set | void | name: string, value: string|Blob|File, filename?: string |
| has | boolean | name: string |
| get | File | string | name: string |
| delete | void | name: string |
| forEach | void | callbackfn: (value: File | string, key: string) =>void |
File Apis
اضافه شده در ورژن appsan-js:0.1.51
اظلاعات بیشتر در Web File Api
کلاس ها:
Blob
| Method | Type | Inputs |
| constructor | Blob | blobParts: (string|Blob|)[], options: {type?: string;} |
File
| Method | Type | Inputs |
| constructor | File extends Blob | fileBits: (string|Blob|)[], fileName: string, options?: {type?: string, lastModified?: number} |
FileList
| Method | Type | Inputs |
| item | File | null; | index: number |
| [index: number] | File | - |
WebSocket Apis
این متد ها از ورژن jsscript:0.1.72 در دسترس است.
WebSocket
| Method / Property |
Type | Inputs |
| constructor | WebSocket | url: string, protocols?: string | string[] |
| addEventListener | void | type: 'open' | 'message' | 'close' | 'error', callback: (event) => void |
| url | string | - |
| readyState | int | - |
| send | void | message: string |
| close | void |
برای اطلاعات بیشتر مستندات websocket وب را مطالعه نمایید.
No Comments