ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
DocumentInfo Structure
DocumentInfo Properties
Category Property
ContextCallback Property
Flags Property
Name Property
SourceMapUri Property
Uri Property

# DocumentInfoContextCallback Property

Gets or sets an optional context callback for the document.
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public DocumentContextCallback ContextCallback {
    	get;
     set; }

    Public Property ContextCallback As DocumentContextCallback
    		Get
    	Set

    public:
    property DocumentContextCallback^ ContextCallback {
    		DocumentContextCallback^ get ();
    	void set (DocumentContextCallback^ value);
    }

    member ContextCallback : DocumentContextCallback with
    		get, set

#### Property Value

DocumentContextCallback
Remarks

This property currently applies only to modules. If specified, the callback is invoked the first time the 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

#### Reference

DocumentInfo Structure
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft