fune/devtools/client/webconsole/test/browser/test-same-origin-required-load.html
Boris Zbarsky cbc90e1aca Bug 1602090 part 2. Create separate CheckMayLoad and CheckMayLoadWithReporting APIs. r=ckerschb
CheckMayLoadAndReport takes a window ID.  This allows us to report
errors from it to the web console as needed.  Most consumers know statically
whether they want reporting or not, so there's no reason to force the ones that
don't to provide window ids.

Differential Revision: https://phabricator.services.mozilla.com/D56388

--HG--
extra : moz-landing-system : lando
2019-12-13 06:24:12 +00:00

26 lines
770 B
HTML

<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Test loads that are required to be same-origin (no CORS involved)</title>
<script>
/* exported testTrack */
"use strict";
function testTrack(url) {
const body = document.body;
const video = document.createElement("video");
const track = document.createElement("track");
track.src = url;
track.default = true;
video.append(track);
body.append(video);
}
</script>
</head>
<body>
</body>
</html>