You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 55bce9c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/API-Reference/language/CodeInspection.md
+20-9Lines changed: 20 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,17 +111,11 @@ Scrolls to the problem line
111
111
112
112
<aname="run"></a>
113
113
114
-
## run(providerName)
115
-
Run inspector applicable to current document. Updates status bar indicator and refreshes error list in
116
-
bottom panel. Does not run if inspection is disabled or if a providerName is given and does not
117
-
match the current doc's provider name.
114
+
## run()
115
+
Run inspectors for the current document and publish results from the latest unchanged scan.
116
+
Does not scan while inspection is disabled. Keeps valid fixes available until a current scan replaces them.
118
117
119
118
**Kind**: global function
120
-
121
-
| Param | Type | Description |
122
-
| --- | --- | --- |
123
-
| providerName | <code>string</code> | name of the provider that is requesting a run |
124
-
125
119
<aname="toggleEnabled"></a>
126
120
127
121
## toggleEnabled(enabled, doNotSave)
@@ -134,6 +128,23 @@ Enable or disable all inspection.
134
128
| enabled | <code>boolean</code> | Enabled state. If omitted, the state is toggled. |
135
129
| doNotSave | <code>boolean</code> | true if the preference should not be saved to user settings. This is generally for events triggered by project-level settings. |
136
130
131
+
<aname="_fixProblem"></a>
132
+
133
+
## \_fixProblem(fixID)
134
+
Apply one fix if its document and text still match the displayed inspection results.
135
+
136
+
**Kind**: global function
137
+
138
+
| Param | Type | Description |
139
+
| --- | --- | --- |
140
+
| fixID | <code>string</code> | ID assigned to the displayed fix. |
141
+
142
+
<aname="_fixAllProblems"></a>
143
+
144
+
## \_fixAllProblems()
145
+
Apply all displayed fixes only to the document version that was inspected.
Runs an operation again when it fails, waiting longer before each retry. Meant for calls
218
+
that may hit a network blip or a service that is restarting: the first retry is quick and
219
+
the later ones are spaced out, so a short outage is ridden out without hammering the other
220
+
side. Each wait is jittered so many clients recovering at once do not retry in step.
221
+
222
+
The operation is called with the attempt number, starting at 1, and returns a Promise (a
223
+
plain value or another thenable, such as a jQuery promise, is adopted with Promise.resolve).
224
+
A thrown error or a rejection counts as a failure. Always returns a native Promise: it
225
+
resolves with the first successful value and rejects with the last failure once the attempts
226
+
are used up, or as soon as `shouldRetry` says a failure is not worth retrying, or when the
227
+
signal aborts.
228
+
229
+
**Kind**: global function
230
+
231
+
| Param | Type | Default | Description |
232
+
| --- | --- | --- | --- |
233
+
| operation | <code>function</code> || called with the attempt number (1-based) |
234
+
|[options]| <code>Object</code> |||
235
+
|[options.attempts]| <code>number</code> | <code>5</code> | how many times to try in all, the first included |
236
+
|[options.delaysMs]| <code>number</code> \| <code>Array.<number></code> | <code>[5000, 15000, 30000, 60000]</code> | the wait before each retry. A number is a fixed wait; an array gives the waits in order, and its last value repeats when there are more retries than entries. |
237
+
|[options.jitter]| <code>number</code> | <code>0.25</code> | each wait is varied at random by up to this fraction either way; 0 disables it |
238
+
|[options.shouldRetry]| <code>function</code> || given the failure and the attempt that failed; return false to stop at once. Every failure is retried by default. |
239
+
|[options.onRetry]| <code>function</code> || told the failure, the attempt that failed and the wait in ms before each retry, for logging |
240
+
|[options.timeoutMs]| <code>number</code> || a cap on each attempt; one that runs longer fails with Async.ERROR_TIMEOUT and is retried like any other failure |
241
+
|[options.signal]| <code>AbortSignal</code> || aborting it ends the waiting and rejects with the signal's reason |
Copy file name to clipboardExpand all lines: docs/API-Reference/widgets/NotificationUI.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ let notification1 = NotificationUI.createFromTemplate(
119
119
| title | <code>string</code> | The title for the notification. |
120
120
| template | <code>string</code> \| <code>Element</code> | A string template or HTML Element to use as the dialog HTML. |
121
121
|[elementID]| <code>String</code> | optional id string if provided will show the notification pointing to the element. If no element is specified, it will be managed as a generic notification. |
122
-
|[options]| <code>Object</code> | optional, supported * options are: * `allowedPlacements` - Optional String array with values restricting where the notification will be shown. Values can be a mix of `['top', 'bottom', 'left', 'right']` * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. |
122
+
|[options]| <code>Object</code> | optional, supported * options are: * `allowedPlacements` - Optional String array with values restricting where the notification will be shown. Values can be a mix of `['top', 'bottom', 'left', 'right']` * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. The countdown pauses while the mouse is over the notification. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. |
@@ -146,7 +146,7 @@ let notification1 = NotificationUI.createToastFromTemplate( "Title here",
146
146
| --- | --- | --- |
147
147
| title | <code>string</code> | The title for the notification. |
148
148
| template | <code>string</code> \| <code>Element</code> | A string template or HTML Element to use as the dialog HTML. |
149
-
|[options]| <code>Object</code> | optional, supported * options are: * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. * `instantOpen` - To instantly open the popup without any open animation delays |
149
+
|[options]| <code>Object</code> | optional, supported * options are: * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. The countdown pauses while the mouse is over the notification. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. * `instantOpen` - To instantly open the popup without any open animation delays |
| containerOrSelector | <code>Element</code> \| <code>string</code> | A DOM element or CSS selector for the parent container. The container should have `position: relative` or `absolute` so the toast is positioned correctly. |
170
170
| template | <code>string</code> \| <code>Element</code> | HTML string or DOM Element for the toast content. |
171
-
|[options]| <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the toast auto-closes. Default is 5. * `dismissOnClick` - If true, clicking the toast dismisses it. Default is true. |
171
+
|[options]| <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the toast auto-closes. Default is 5. The countdown pauses while the mouse is over the toast. * `dismissOnClick` - If true, clicking the toast dismisses it. Default is true. |
| iconClass | <code>string</code> | Font Awesome class string for the icon (e.g. "fa-solid fa-magnifying-glass-plus"). |
190
190
| label | <code>string</code> | Text to display below the icon (e.g. "110%"). |
191
-
|[options]| <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the HUD auto-closes. Default is 1. |
191
+
|[options]| <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the HUD auto-closes. Default is 1. The countdown pauses while the mouse is over the HUD. |
0 commit comments