|
@@ -4,6 +4,7 @@
|
|
|
{
|
|
|
private bool _discardGlobal;
|
|
|
private bool _strict;
|
|
|
+ private bool _allowDebuggerStatement;
|
|
|
|
|
|
/// <summary>
|
|
|
/// When called, doesn't initialize the global scope.
|
|
@@ -15,12 +16,28 @@
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Run the script in strict mode.
|
|
|
+ /// </summary>
|
|
|
public Options Strict(bool strict = true)
|
|
|
{
|
|
|
_strict = strict;
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Allow the <code>debugger</code> statement to be called in a script.
|
|
|
+ /// </summary>
|
|
|
+ /// <remarks>
|
|
|
+ /// Because the <code>debugger</code> statement can start the
|
|
|
+ /// Visual Studio debugger, is it disabled by default
|
|
|
+ /// </remarks>
|
|
|
+ public Options AllowDebuggerStatement(bool allowDebuggerStatement = true)
|
|
|
+ {
|
|
|
+ _allowDebuggerStatement = allowDebuggerStatement;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
internal bool GetDiscardGlobal()
|
|
|
{
|
|
|
return _discardGlobal;
|
|
@@ -30,5 +47,10 @@
|
|
|
{
|
|
|
return _strict;
|
|
|
}
|
|
|
+
|
|
|
+ internal bool IsDebuggerStatementAllowed()
|
|
|
+ {
|
|
|
+ return _allowDebuggerStatement;
|
|
|
+ }
|
|
|
}
|
|
|
}
|