MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / checkType

Method checkType

src/common/events.js:7–11  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

5 }
6
7 checkType(type) {
8 if (this.allowed && !this.allowed.includes(type)) {
9 throw new Error(`Unknown event type: ${type}`);
10 }
11 }
12
13 on(type, handle) {
14 this.checkType(type);

Callers 3

onMethod · 0.95
offMethod · 0.95
emitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected