-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
195 additions
and
171 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"prefer-rest-params": "off", | ||
"@typescript-eslint/no-this-alias": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/no-require-imports": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"prefer-spread": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
setTimeout(function () { | ||
fetch(location.href) | ||
}, 1000) | ||
|
||
function testFetch() { | ||
fetch('/index.js') | ||
fetch('https://domainnotexist.com').catch(err => { | ||
console.error(err) | ||
}) | ||
} | ||
|
||
function testXhr() { | ||
let xhr = new XMLHttpRequest() | ||
xhr.open('GET', '/index.js', true) | ||
xhr.send() | ||
|
||
xhr = new XMLHttpRequest() | ||
xhr.open('GET', 'https://domainnotexist.com', true) | ||
xhr.send() | ||
} | ||
|
||
function testWs() { | ||
const text = 'This is the text used for testing!' | ||
|
||
const enc = new TextEncoder() | ||
const ws = new WebSocket('wss://echo.websocket.org') | ||
|
||
ws.onopen = function () { | ||
ws.send(text) | ||
ws.send(enc.encode(text)) | ||
} | ||
setTimeout(() => { | ||
ws.close() | ||
}, 1000) | ||
} | ||
|
||
testFetch() | ||
testXhr() | ||
testWs() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.