mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
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:
parent
5865ec4f92
commit
3c54d52aca
@ -643,7 +643,6 @@ const rollouts = [
|
||||
"dom/tests/mochitest/**",
|
||||
"dom/vr/test/**",
|
||||
"dom/webauthn/tests/**",
|
||||
"dom/websocket/tests/**",
|
||||
"dom/workers/test/**",
|
||||
],
|
||||
rules: {
|
||||
|
@ -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>" +
|
||||
|
@ -9,7 +9,7 @@ onmessage = function (event) {
|
||||
return;
|
||||
}
|
||||
|
||||
status = false;
|
||||
let status = false;
|
||||
try {
|
||||
if (WebSocket instanceof Object) {
|
||||
status = true;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user