HtmlWidgetHelpers.InjectWidgetProtocol Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Injects the MCP Apps protocol script into widget HTML. If the HTML already contains the protocol (detected by "ui/initialize"), it is returned unchanged.
public static string InjectWidgetProtocol(string html, Microsoft.Teams.Apps.HtmlWidget.InjectWidgetProtocolOptions? options = default);
static member InjectWidgetProtocol : string * Microsoft.Teams.Apps.HtmlWidget.InjectWidgetProtocolOptions -> string
Public Shared Function InjectWidgetProtocol (html As String, Optional options As InjectWidgetProtocolOptions = Nothing) As String
Parameters
- html
- String
The raw HTML content for the widget.
- options
- InjectWidgetProtocolOptions
Optional configuration for the protocol setup.
Returns
The HTML with the protocol script injected.