diff options
author | Michal Klocek <michal.klocek@qt.io> | 2022-12-09 10:46:23 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2022-12-16 08:58:48 +0000 |
commit | cbc622f158a94fea9c6af8d675a8743e98267109 (patch) | |
tree | 9e67fabc151190b34d4dd2dfc2db09ff88f3aae5 /examples/webenginewidgets/push-notifications/content/worker.js | |
parent | ae2ca250efd331d4eb1d843a91735020cbb87be2 (diff) |
Fix qdoc warnings
As JavaScript parsing issue got fixed , the limit was
not changed, meaning there where 4 "unused" warnings
possibilities. In the meantime another change
e6a13d97898f3f4b19f61006d0716ca9e1b9f037
was merged which had 3 qdoc issues, which got therefore
unnoticed.
Fix those issues.
Do not use underscore in example name and rename push_notification
to push-notifications (like qtbase network-chat).
Pick-to: 6.5
Change-Id: I2635424e24d3b9a0a02c2e6fe8ac383eec95c112
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'examples/webenginewidgets/push-notifications/content/worker.js')
-rw-r--r-- | examples/webenginewidgets/push-notifications/content/worker.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/webenginewidgets/push-notifications/content/worker.js b/examples/webenginewidgets/push-notifications/content/worker.js new file mode 100644 index 000000000..ed660a6e9 --- /dev/null +++ b/examples/webenginewidgets/push-notifications/content/worker.js @@ -0,0 +1,7 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +self.addEventListener('push', event => { + const data = event.data.json(); + self.registration.showNotification(data.title, { body : data.text }); +}); |