@readium/navigator 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +215 -215
- package/dist/index.umd.cjs +12 -12
- package/package.json +1 -1
- package/src/protection/DevToolsDetector.ts +1 -0
- package/src/webpub/WebPubNavigator.ts +6 -2
package/package.json
CHANGED
|
@@ -129,8 +129,12 @@ export class WebPubNavigator extends VisualNavigator implements Configurable<Web
|
|
|
129
129
|
|
|
130
130
|
// Listen for custom events from NavigatorProtector
|
|
131
131
|
this._suspiciousActivityListener = (event: Event) => {
|
|
132
|
-
const
|
|
133
|
-
|
|
132
|
+
const { type, ...activity } = (event as CustomEvent).detail;
|
|
133
|
+
if (type === "context_menu") {
|
|
134
|
+
this.listeners.contextMenu(activity as ContextMenuEvent);
|
|
135
|
+
} else {
|
|
136
|
+
this.listeners.contentProtection(type, activity);
|
|
137
|
+
}
|
|
134
138
|
};
|
|
135
139
|
window.addEventListener(NAVIGATOR_SUSPICIOUS_ACTIVITY_EVENT, this._suspiciousActivityListener);
|
|
136
140
|
}
|