Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion js/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ window.addEventListener("load", () => {
const iframeRegularWindow = iframeRegularEl?.contentWindow;
/** @type {HTMLIFrameElement} */
const iframeAllowSameOrigin = document.getElementById('iframe-allow-same-origin');
const iframeAllowSameOriginWindow = iframeAllowSameOrigin?.contentWindow;
const iframeAllowSameOriginWindow = iframeAllowSameOrigin?.contentWindow?.window;
const iframeRegularElDoc = iframeRegularEl.contentDocument
iframeRegularElDoc.body.innerHTML += "<iframe id=i></iframe>"
const iframeNotInitedWindow = iframeRegularElDoc?.getElementById("i").contentWindow.window;
const tests = [
["RTCPeerConnection", window.RTCPeerConnection],
["mozRTCPeerConnection", window.mozRTCPeerConnection],
Expand All @@ -108,6 +111,9 @@ window.addEventListener("load", () => {
["iframe regular RTCPeerConnection", iframeRegularWindow?.RTCPeerConnection],
["iframe regular mozRTCPeerConnection", iframeRegularWindow?.mozRTCPeerConnection],
["iframe regular webkitRTCPeerConnection", iframeRegularWindow?.webkitRTCPeerConnection],
["iframe regular uninitialized RTCPeerConnection", iframeNotInitedWindow?.RTCPeerConnection],
["iframe regular uninitialized mozRTCPeerConnection", iframeNotInitedWindow?.mozRTCPeerConnection],
["iframe regular uninitialized webkitRTCPeerConnection", iframeNotInitedWindow?.webkitRTCPeerConnection],
];
const elements = [];
const testPromises = [];
Expand Down