chore(frontend-docs): fix warnings & update

This commit is contained in:
Elian Doran
2024-12-11 18:31:29 +02:00
parent 1fa2758464
commit 6bbff3efd8
21 changed files with 2070 additions and 169 deletions

View File

@@ -76,6 +76,11 @@ class NoteContextAwareWidget extends BasicWidget {
}
/**
* Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden.
*
* <p>
* If the widget is not enabled, it will not receive `refreshWithNote` updates.
*
* @returns {boolean} true when an active note exists
*/
isEnabled() {
@@ -85,7 +90,17 @@ class NoteContextAwareWidget extends BasicWidget {
async refresh() {
if (this.isEnabled()) {
this.toggleInt(true);
await this.refreshWithNote(this.note);
try {
await this.refreshWithNote(this.note);
} catch (e) {
// Ignore errors when user is refreshing or navigating away.
if (e === "rejected by browser") {
return;
}
throw e;
}
}
else {
this.toggleInt(false);
@@ -164,7 +179,7 @@ export default NoteContextAwareWidget;
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.3</a>
</footer>
<script> prettyPrint(); </script>