Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Osbourne committed Sep 25, 2024
1 parent 72be031 commit 1442c87
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 4 additions & 1 deletion build/app/public/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -14392,7 +14392,6 @@
/**
* {@inheritDoc common.openInNewTab}
* @type {import("./common.js").openInNewTab}
*
* ```js
* const payload = JSON.stringify({
* "url": "https://help.duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/"
Expand Down Expand Up @@ -14443,6 +14442,10 @@
/**
* {@inheritDoc common.sendToggleReport}
* @type {import("./common.js").sendToggleReport}
* @example
* ```js
* window.PrivacyDashboard.sendToggleReport()
* ```
*/
sendToggleReport() {
invariant(window.PrivacyDashboard?.sendToggleReport, "sendToggleReport missing");
Expand Down
9 changes: 7 additions & 2 deletions guides/toggle-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,23 @@
* </details>
*
* - WebKit: {@link "macOS integration".privacyDashboardGetToggleReportOptions}
* - Other platforms will be added
* - Android: {@link "Android integration".PrivacyDashboardJavascriptInterface.getToggleReportOptions}
*
* ## Step 4: Implement new handlers
*
* The following are all sent in response to user interactions
*
* ### 👆Sending/rejecting the report
* ### 👆Sending the report
* - WebKit: {@link "macOS integration".privacyDashboardSendToggleReport}
* - Android: {@link "Android integration".PrivacyDashboardJavascriptInterface.sendToggleReport}
*
* ### 👆Rejecting the report
* - WebKit: {@link "macOS integration".privacyDashboardRejectToggleReport}
* - Android: {@link "Android integration".PrivacyDashboardJavascriptInterface.rejectToggleReport}
*
* ### 👆Tapping the 'see what's sent' list
* - Webkit: {@link "macOS integration".privacyDashboardSeeWhatIsSent}
* - Android: {@link "Android integration".PrivacyDashboardJavascriptInterface.seeWhatIsSent}
*
* ### 👆Tapping anywhere on the success screen (macos only)
* - Webkit: {@link "macOS integration".privacyDashboardClose}
Expand Down
5 changes: 4 additions & 1 deletion shared/js/browser/android-communication.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ export class PrivacyDashboardJavascriptInterface {
/**
* {@inheritDoc common.openInNewTab}
* @type {import("./common.js").openInNewTab}
*
* ```js
* const payload = JSON.stringify({
* "url": "https://help.duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/"
Expand Down Expand Up @@ -347,6 +346,10 @@ export class PrivacyDashboardJavascriptInterface {
/**
* {@inheritDoc common.sendToggleReport}
* @type {import("./common.js").sendToggleReport}
* @example
* ```js
* window.PrivacyDashboard.sendToggleReport()
* ```
*/
sendToggleReport() {
invariant(window.PrivacyDashboard?.sendToggleReport, 'sendToggleReport missing')
Expand Down

0 comments on commit 1442c87

Please sign in to comment.