Click or drag to resize

DocumentSettingsContextCallback Property

Gets or sets an optional document context callback.

Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
public DocumentContextCallback ContextCallback { get; set; }

Property Value


This property is used as an alternative to ContextCallback. If specified, the callback is invoked the first time a module attempts to retrieve its context information. The properties it returns are made available to the module implementation. This mechanism can be used to expose host resources selectively, securely, and without polluting the script engine's global namespace.

Use import.meta to access the context information of a Standard JavaScript module. In a CommonJS module, use module.meta.

See Also