Bug 1914620 - Enable remaining ESLint rules for dom/websocket. r=necko-reviewers,frontend-codestyle-reviewers,jesup

Differential Revision: https://phabricator.services.mozilla.com/D219976
This commit is contained in:
Mark Banner 2024-08-28 11:23:08 +00:00
parent 5865ec4f92
commit 3c54d52aca
4 changed files with 6 additions and 5 deletions

View File

@ -643,7 +643,6 @@ const rollouts = [
"dom/tests/mochitest/**",
"dom/vr/test/**",
"dom/webauthn/tests/**",
"dom/websocket/tests/**",
"dom/workers/test/**",
],
rules: {

View File

@ -1,6 +1,8 @@
<html><body>
<iframe id="frame" sandbox="allow-scripts allow-popups"></iframe>
<script type="application/javascript">
/* eslint-disable no-useless-concat */
onmessage = function(e) {
parent.postMessage(e.data, '*');
}
@ -8,11 +10,11 @@ onmessage = function(e) {
var ifr = document.getElementById('frame');
if (location.search == '?nested') {
var url = new URL(location);
let url = new URL(location);
url.search = "";
ifr.src = url.href;
} else if (location.search == '?popup') {
var url = new URL(location);
let url = new URL(location);
url.search = "?opener";
ifr.srcdoc = "<html><script>" +

View File

@ -9,7 +9,7 @@ onmessage = function (event) {
return;
}
status = false;
let status = false;
try {
if (WebSocket instanceof Object) {
status = true;

View File

@ -21,7 +21,7 @@ function startsWith(target, prefix)
function distinctBytes()
{
var array = new Array();
var array = [];
for (var i = 0; i < 256; ++i)
array[i] = i;
// Concatenates chars into a single binary string