Panel API: JS #243
taufik-nurrohman
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This article is a draft and will be moved to the official web site when the API is matured.
To prevent conflicts with third-party libraries, all JavaScript features related to Panel need to be contained in global variable
_
.Dialog
_.dialog(content: string|Array|Node|NodeList, then?: Function): Promise
Spawn a basic dialog box with overlay.
_.dialog.alert(description: string): Promise
Spawn an alert dialog box with overlay.
_.dialog.confirm(description: string): Promise
Spawn a confirmation dialog box with overlay.
_.dialog.prompt(key: string, value?: string): Promise
Spawn a prompt dialog box with overlay.
Hook
_.fire(hook: string, data?: Array): Window
_.off(hook: string, context?: Function): Window
_.on(hook: string, then: Function): Window
change
x\panel\type\menu()
,x\panel\type\stacks()
andx\panel\type\tabs()
can work properly when those components are rendered by AJAX call.change.stack
change.tab
Once the component is loaded by AJAX call, make sure to trigger the
change
event:Event consumers can then re-execute their DOM manipulation tasks via this
change
event:Keys
Global keyboard’s key maps.
Commands
Global reusable commands. Usually will be used by the
_.keys
implementation.Beta Was this translation helpful? Give feedback.
All reactions