Skip to content

Commit 4dad315

Browse files
committed
docs: comments
1 parent b05f009 commit 4dad315

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

docs/content/1.guide/12.in-page-channel.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,20 @@ export const MY_CHANNEL = 'devframes:plugin:my-tool'
3838

3939
export interface MyChannelProtocol extends InPageChannelProtocol {
4040
functions: {
41+
/** implemented by the page script, callable by panels */
4142
pageScript: {
4243
measure: (selector: string) => { width: number, height: number }
4344
reset: () => Promise<void>
4445
}
46+
/** implemented by panels, callable by the page script */
47+
panel: {
48+
echo: (message: string) => Promise<string>
49+
}
4550
}
4651
events: {
52+
/** listened to by the page script, emitted by panels */
4753
pageScript: { highlight: (selector: string) => void }
54+
/** listened to by panels, emitted by the page script */
4855
panel: { flash: (message: string) => void }
4956
}
5057
sharedStates: {

0 commit comments

Comments
 (0)