Skip to content

Commit 5a01962

Browse files
committed
fix (websocket): ErrorEvent constructor should convert arguments before passing to super()
1 parent 80d5f32 commit 5a01962

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/web/websocket/events.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@ class ErrorEvent extends Event {
143143
const prefix = 'ErrorEvent constructor'
144144
webidl.argumentLengthCheck(arguments, 1, prefix)
145145

146-
super(type, eventInitDict)
147-
webidl.util.markAsUncloneable(this)
148-
149146
type = webidl.converters.DOMString(type, prefix, 'type')
150147
eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {})
151148

149+
super(type, eventInitDict)
150+
152151
this.#eventInit = eventInitDict
152+
webidl.util.markAsUncloneable(this)
153153
}
154154

155155
get message () {

0 commit comments

Comments
 (0)