x-ms-webview.addWebAllowedObject method
Adds a native Windows Runtime object as a global parameter to the top-level document inside of a WebView.
Syntax
x-ms-webview.addWebAllowedObject(name, applicationObject);
Parameters
- name
-
Type: String
The name of the object to expose to the document in the WebView.
- applicationObject
-
Type: Object
The object to expose to the document in the WebView.
Return value
This method does not return a value.
Remarks
Use this method to expose a native Windows Runtime object as a global parameter in the context of the top level document inside of a WebView. For a Windows Runtime object to be projected, it must implement the IAgileObject interface and be decorated with the AllowForWeb attribute. If the object does not implement IAgileObject, the input is considered not valid.
Requirements
|
Minimum supported client |
Windows 10 [Windows Store apps only] |
|---|---|
|
Minimum supported server |
None supported |
|
Minimum supported phone |
None supported |
See also