Class TrustedScriptURL
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The TrustedScriptURL interface of the {{domxref("Trusted Types API", "", "", "nocode")}} represents a string that a developer can insert into an injection sink that will parse it as a URL of an external script. These objects are created via CreateScriptURL(string, params dynamic[]) and therefore have no constructor.
[Value("TrustedScriptURL")]
public class TrustedScriptURL
- Inheritance
-
TrustedScriptURL
- Inherited Members
Remarks
The value of a TrustedScriptURL object is set when the object is created and cannot be changed by JavaScript as there is no setter exposed.
-Prevent DOM-based cross-site scripting vulnerabilities with Trusted Types
Constructors
TrustedScriptURL()
public TrustedScriptURL()
Methods
ToJSON()
The toJSON() method of the TrustedScriptURL interface returns a JSON representation of the stored data.
[Value("toJSON")]
public string ToJSON()
Returns
- string
A string containing a JSON representation of the stored data.