SetFormScriptLimits
Forms, JavaScript safety
Description
Configures independent limits for form-script source length, interpreter operations, parser nesting, string values and object-property accesses
Syntax
Function TPDFlib.SetFormScriptLimits(MaxScriptLength, MaxOperations, MaxNestingDepth, MaxStringLength, MaxPropertyAccesses: Integer): Integer;
Parameters
| MaxScriptLength | Source-character limit from 1,024 through 1,048,576 |
|---|---|
| MaxOperations | Interpreter-operation limit from 64 through 1,000,000 |
| MaxNestingDepth | Parser nesting limit from 8 through 256 |
| MaxStringLength | Per-string character limit from 1,024 through 16,777,216 |
| MaxPropertyAccesses | Object-property access limit from 16 through 1,000,000 |
Return values
Returns 1 when all limits are accepted, or 0 with LastErrorCode 708 when any value is outside its range
Remarks
The defaults are 65,536 source characters, 4,096 operations, 64 nesting levels, 1,048,576 string characters and 4,096 property accesses
The same limits apply to direct field-event execution, recalculation and dependency analysis
See also
GetFormScriptLimitsJSON, GetFormScriptDiagnostics, ExecuteFormFieldScriptEvent