Asper Header  1.0.14
The header injector extension
Loading...
Searching...
No Matches
MockWebview Class Reference

Mock implementation of VS Code webview for testing. More...

Collaboration diagram for MockWebview:
Collaboration graph

Public Member Functions

get html ()
 
 onDidReceiveMessage (handler:(message:any)=> void)
 Registers a message handler for webview communication.
 
 postMessage (message:any)
 Sends a message to all registered message handlers.
 
get html ()
 Gets the current HTML content of the webview.
 
 onDidReceiveMessage (handler:(message:any)=> void)
 Registers a message handler for webview communication.
 
 postMessage (message:any)
 Posts a message to all registered handlers.
 
get html ()
 Gets the current HTML content of the webview.
 
 onDidReceiveMessage (handler:(message:any)=> void)
 Registers a message handler for webview communication.
 
 postMessage (message:any)
 Posts a message to all registered handlers.
 

Detailed Description

Mock implementation of VS Code webview for testing.

Definition at line 63 of file darling.test.ts.

Member Function Documentation

◆ html() [1/3]

get MockWebview::html ( )
inline

Definition at line 67 of file darling.test.ts.

◆ html() [2/3]

get MockWebview::html ( )
inline

Gets the current HTML content of the webview.

Returns
The HTML content string

Sets the HTML content of the webview

Parameters
valueThe HTML content to set

Definition at line 51 of file randomLogo.test.ts.

◆ html() [3/3]

get MockWebview::html ( )
inline

Gets the current HTML content of the webview.

Returns
The HTML content string

Sets the HTML content of the webview

Parameters
valueThe HTML content to set

Definition at line 63 of file watermark.test.ts.

◆ onDidReceiveMessage() [1/3]

MockWebview::onDidReceiveMessage ( handler:(message:any),
void )
inline

Registers a message handler for webview communication.

Parameters
handlerFunction to handle incoming messages from webview
Returns
Disposable object for cleanup

Definition at line 80 of file darling.test.ts.

◆ onDidReceiveMessage() [2/3]

MockWebview::onDidReceiveMessage ( handler:(message:any),
void )
inline

Registers a message handler for webview communication.

Parameters
handlerFunction to handle received messages
Returns
Disposable object for cleanup

Definition at line 68 of file randomLogo.test.ts.

◆ onDidReceiveMessage() [3/3]

MockWebview::onDidReceiveMessage ( handler:(message:any),
void )
inline

Registers a message handler for webview communication.

Parameters
handlerFunction to handle received messages
Returns
Disposable object for cleanup

Definition at line 80 of file watermark.test.ts.

◆ postMessage() [1/3]

MockWebview::postMessage ( message:any)
inline

Sends a message to all registered message handlers.

Parameters
messageMessage object to broadcast to handlers

Definition at line 89 of file darling.test.ts.

◆ postMessage() [2/3]

MockWebview::postMessage ( message:any)
inline

Posts a message to all registered handlers.

Parameters
messageThe message object to send

Definition at line 77 of file randomLogo.test.ts.

◆ postMessage() [3/3]

MockWebview::postMessage ( message:any)
inline

Posts a message to all registered handlers.

Parameters
messageThe message object to send

Definition at line 89 of file watermark.test.ts.


The documentation for this class was generated from the following files: