Skip to content

Commit

Permalink
fix and improve description
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Jan 11, 2023
1 parent 68b112c commit bb1960e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/scriptlets/trusted-set-constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ import {
*
* > If empty object is present in chain it will be trapped until chain leftovers appear.
*
* > Use [set-constant](./about-scriptlets.md#set-constant) to set predefined values and functions
* > Use [set-constant](./about-scriptlets.md#set-constant) to set predefined values and functions.
*
* **Syntax**
* ```
* example.org#%#//scriptlet('trusted-set-constant', property, value[, inferType[, stack]])
* example.org#%#//scriptlet('trusted-set-constant', property, value[, stack])
* ```
*
* - `property` - required, path to a property (joined with `.` if needed). The property must be attached to `window`.
* - `value` - required, an arbitrary value to be set. Value type is being inferred from the argument.
* - `value` - required, an arbitrary value to be set; value type is being inferred from the argument, e.g '500' will be set as number;
* to set string type value wrap argument into another pair of quotes: `'"500"'`;
* - `stack` - optional, string or regular expression that must match the current function call stack trace;
* if regular expression is invalid it will be skipped
*
Expand Down

0 comments on commit bb1960e

Please sign in to comment.