mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 20:30:04 +02:00
update node modules
This commit is contained in:
22
node_modules/ws/lib/event-target.js
generated
vendored
22
node_modules/ws/lib/event-target.js
generated
vendored
@@ -12,7 +12,7 @@ class Event {
|
||||
* @param {String} type The name of the event
|
||||
* @param {Object} target A reference to the target to which the event was dispatched
|
||||
*/
|
||||
constructor (type, target) {
|
||||
constructor(type, target) {
|
||||
this.target = target;
|
||||
this.type = type;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ class MessageEvent extends Event {
|
||||
* @param {(String|Buffer|ArrayBuffer|Buffer[])} data The received data
|
||||
* @param {WebSocket} target A reference to the target to which the event was dispatched
|
||||
*/
|
||||
constructor (data, target) {
|
||||
constructor(data, target) {
|
||||
super('message', target);
|
||||
|
||||
this.data = data;
|
||||
@@ -52,7 +52,7 @@ class CloseEvent extends Event {
|
||||
* @param {String} reason A human-readable string explaining why the connection is closing
|
||||
* @param {WebSocket} target A reference to the target to which the event was dispatched
|
||||
*/
|
||||
constructor (code, reason, target) {
|
||||
constructor(code, reason, target) {
|
||||
super('close', target);
|
||||
|
||||
this.wasClean = target._closeFrameReceived && target._closeFrameSent;
|
||||
@@ -73,7 +73,7 @@ class OpenEvent extends Event {
|
||||
*
|
||||
* @param {WebSocket} target A reference to the target to which the event was dispatched
|
||||
*/
|
||||
constructor (target) {
|
||||
constructor(target) {
|
||||
super('open', target);
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,7 @@ class ErrorEvent extends Event {
|
||||
* @param {Object} error The error that generated this event
|
||||
* @param {WebSocket} target A reference to the target to which the event was dispatched
|
||||
*/
|
||||
constructor (error, target) {
|
||||
constructor(error, target) {
|
||||
super('error', target);
|
||||
|
||||
this.message = error.message;
|
||||
@@ -113,22 +113,22 @@ const EventTarget = {
|
||||
* @param {Function} listener The listener to add
|
||||
* @public
|
||||
*/
|
||||
addEventListener (method, listener) {
|
||||
addEventListener(method, listener) {
|
||||
if (typeof listener !== 'function') return;
|
||||
|
||||
function onMessage (data) {
|
||||
function onMessage(data) {
|
||||
listener.call(this, new MessageEvent(data, this));
|
||||
}
|
||||
|
||||
function onClose (code, message) {
|
||||
function onClose(code, message) {
|
||||
listener.call(this, new CloseEvent(code, message, this));
|
||||
}
|
||||
|
||||
function onError (error) {
|
||||
function onError(error) {
|
||||
listener.call(this, new ErrorEvent(error, this));
|
||||
}
|
||||
|
||||
function onOpen () {
|
||||
function onOpen() {
|
||||
listener.call(this, new OpenEvent(this));
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ const EventTarget = {
|
||||
* @param {Function} listener The listener to remove
|
||||
* @public
|
||||
*/
|
||||
removeEventListener (method, listener) {
|
||||
removeEventListener(method, listener) {
|
||||
const listeners = this.listeners(method);
|
||||
|
||||
for (var i = 0; i < listeners.length; i++) {
|
||||
|
Reference in New Issue
Block a user