There was an error while loading. Please reload this page.
1 parent b05f009 commit 4dad315Copy full SHA for 4dad315
1 file changed
docs/content/1.guide/12.in-page-channel.md
@@ -38,13 +38,20 @@ export const MY_CHANNEL = 'devframes:plugin:my-tool'
38
39
export interface MyChannelProtocol extends InPageChannelProtocol {
40
functions: {
41
+ /** implemented by the page script, callable by panels */
42
pageScript: {
43
measure: (selector: string) => { width: number, height: number }
44
reset: () => Promise<void>
45
}
46
+ /** implemented by panels, callable by the page script */
47
+ panel: {
48
+ echo: (message: string) => Promise<string>
49
+ }
50
51
events: {
52
+ /** listened to by the page script, emitted by panels */
53
pageScript: { highlight: (selector: string) => void }
54
+ /** listened to by panels, emitted by the page script */
55
panel: { flash: (message: string) => void }
56
57
sharedStates: {
0 commit comments