Skip to content

Commit

Permalink
Update 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jc3213 authored Aug 19, 2024
1 parent 1ad4f7e commit 93a115f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions archived/aria2_0.7.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ class Aria2 {
this.socket?.then( (ws) => ws.close() );
}
set onmessage (callback) {
this.jsonrpc.onmessage = callback;
this.jsonrpc.onmessage = typeof callback === 'function' ? callback : null;
}
get onmessage () {
return typeof this.jsonrpc.onmessage === 'function' ? this.jsonrpc.onmessage : null;
}
set onclose (callback) {
this.jsonrpc.onclose = callback;
this.jsonrpc.onclose = typeof callback === 'function' ? callback : null;
}
get onclose () {
return typeof this.jsonrpc.onclose === 'function' ? this.jsonrpc.onclose : null;
Expand Down
4 changes: 2 additions & 2 deletions aria2.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ class Aria2 {
this.socket?.then( (ws) => ws.close() );
}
set onmessage (callback) {
this.jsonrpc.onmessage = callback;
this.jsonrpc.onmessage = typeof callback === 'function' ? callback : null;
}
get onmessage () {
return typeof this.jsonrpc.onmessage === 'function' ? this.jsonrpc.onmessage : null;
}
set onclose (callback) {
this.jsonrpc.onclose = callback;
this.jsonrpc.onclose = typeof callback === 'function' ? callback : null;
}
get onclose () {
return typeof this.jsonrpc.onclose === 'function' ? this.jsonrpc.onclose : null;
Expand Down
4 changes: 2 additions & 2 deletions aria2ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class Aria2WebSocket {
this.socket.then( (ws) => ws.close() );
}
set onmessage (callback) {
this._onmessage = callback;
this._onmessage = typeof callback === 'function' ? callback : null;
}
get onmessage () {
return typeof this._onmessage === 'function' ? this._onmessage : null;
}
set onclose (callback) {
this._onclose = callback;
this._onclose = typeof callback === 'function' ? callback : null;
}
get onclose () {
return typeof this._onclose === 'function' ? this._onclose : null;
Expand Down

0 comments on commit 93a115f

Please sign in to comment.