summaryrefslogtreecommitdiff
path: root/ext/web/02_event.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-01-27 16:27:22 +0100
committerGitHub <noreply@github.com>2022-01-27 16:27:22 +0100
commitf248e6f1778dc26db91d3322de2ecca5d1aa9866 (patch)
tree46b1ff59091cc8d31ff67427173d3a0148734007 /ext/web/02_event.js
parent382a978859a7a7a4351542be818bb2e59523429c (diff)
Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)
This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
Diffstat (limited to 'ext/web/02_event.js')
-rw-r--r--ext/web/02_event.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/ext/web/02_event.js b/ext/web/02_event.js
index b32bb01b8..7ba5afa27 100644
--- a/ext/web/02_event.js
+++ b/ext/web/02_event.js
@@ -29,7 +29,6 @@
ObjectCreate,
ObjectDefineProperty,
ObjectGetOwnPropertyDescriptor,
- ObjectPrototypeIsPrototypeOf,
ReflectDefineProperty,
Symbol,
SymbolFor,
@@ -175,7 +174,7 @@
[SymbolFor("Deno.privateCustomInspect")](inspect) {
return inspect(consoleInternal.createFilteredInspectProxy({
object: this,
- evaluate: ObjectPrototypeIsPrototypeOf(Event.prototype, this),
+ evaluate: this instanceof Event,
keys: EVENT_PROPS,
}));
}
@@ -1059,7 +1058,7 @@
[SymbolFor("Deno.privateCustomInspect")](inspect) {
return inspect(consoleInternal.createFilteredInspectProxy({
object: this,
- evaluate: ObjectPrototypeIsPrototypeOf(ErrorEvent.prototype, this),
+ evaluate: this instanceof ErrorEvent,
keys: [
...EVENT_PROPS,
"message",
@@ -1120,7 +1119,7 @@
[SymbolFor("Deno.privateCustomInspect")](inspect) {
return inspect(consoleInternal.createFilteredInspectProxy({
object: this,
- evaluate: ObjectPrototypeIsPrototypeOf(CloseEvent.prototype, this),
+ evaluate: this instanceof CloseEvent,
keys: [
...EVENT_PROPS,
"wasClean",
@@ -1152,7 +1151,7 @@
[SymbolFor("Deno.privateCustomInspect")](inspect) {
return inspect(consoleInternal.createFilteredInspectProxy({
object: this,
- evaluate: ObjectPrototypeIsPrototypeOf(MessageEvent.prototype, this),
+ evaluate: this instanceof MessageEvent,
keys: [
...EVENT_PROPS,
"data",
@@ -1185,7 +1184,7 @@
[SymbolFor("Deno.privateCustomInspect")](inspect) {
return inspect(consoleInternal.createFilteredInspectProxy({
object: this,
- evaluate: ObjectPrototypeIsPrototypeOf(CustomEvent.prototype, this),
+ evaluate: this instanceof CustomEvent,
keys: [
...EVENT_PROPS,
"detail",
@@ -1215,7 +1214,7 @@
[SymbolFor("Deno.privateCustomInspect")](inspect) {
return inspect(consoleInternal.createFilteredInspectProxy({
object: this,
- evaluate: ObjectPrototypeIsPrototypeOf(ProgressEvent.prototype, this),
+ evaluate: this instanceof ProgressEvent,
keys: [
...EVENT_PROPS,
"lengthComputable",
@@ -1239,8 +1238,7 @@
if (
isSpecialErrorEventHandler &&
- ObjectPrototypeIsPrototypeOf(ErrorEvent.prototype, evt) &&
- evt.type === "error"
+ evt instanceof ErrorEvent && evt.type === "error"
) {
const ret = FunctionPrototypeCall(
wrappedHandler.handler,