You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opening a magnet url (for example: magnet:?xt=urn:btih:72383bfbcd0438045f7a75f59ad793747159afff&dn=Ubuntu+Desktop+16.04+LTS by using an iframe, appears to work only once.
It seems I cannot open the magnet url again without first performing a reload.
Yet using nw.Shell.openExternal I can open the same magnet every time.
Also, the same iframe code from within the Chrome 56 Browser works every time.
example code:
<!DOCTYPE html>
<html>
<head>
<title>Standalone Development</title>
</head>
<body style="width: 100%; height: 100%;">
<p>Click the link below to open magnet via iframe</p>
<u onclick="open_Url_Via_Iframe()">open magnet via iframe</u>
<p>Now click on the link a 2nd time,</br>note that it does not seem to work any more,</br>until you do a right-click reload App.</br>Note that the same iframe code,</br>on a chromium 56 Browser works every time.</br>Also, if you open the magnet,</br>using nw.shell you can open it,</br>as many times as you like.</br>click on the link below to try it out.</p>
<u onclick="open_Url_Via_Shell()">open magnet via shell</u>
<script>
function open_Url_Via_Iframe() {
var d = document.createElement('iframe');
d.id = 'url_' + new Date().getTime();
d.style.visibility = 'hidden';
d.src = "magnet:?xt=urn:btih:72383bfbcd0438045f7a75f59ad793747159afff&dn=Ubuntu+Desktop+16.04+LTS";
document.body.appendChild(d);
var dTimer = setInterval(function () {
var dDoc = d.contentDocument || d.contentWindow.document;
if (dDoc.readyState == 'complete') {
document.body.removeChild(d);
clearInterval(dTimer);
return;
}
}, 1000);
};
function open_Url_Via_Shell() {
nw.Shell.openExternal("magnet:?xt=urn:btih:72383bfbcd0438045f7a75f59ad793747159afff&dn=Ubuntu+Desktop+16.04+LTS");
};
</script>
</body>
</html>
I have prepared an test package for you to play with, should you find it useful.
pre-requisites:
NWJS SDK 0.20.0 (Chromium 56) Windows 7 ia32
Opening a magnet url (for example:
magnet:?xt=urn:btih:72383bfbcd0438045f7a75f59ad793747159afff&dn=Ubuntu+Desktop+16.04+LTS
by using an iframe, appears to work only once.It seems I cannot open the magnet url again without first performing a reload.
Yet using nw.Shell.openExternal I can open the same magnet every time.
Also, the same iframe code from within the Chrome 56 Browser works every time.
example code:
I have prepared an test package for you to play with, should you find it useful.
pre-requisites:
archive contains:
The text was updated successfully, but these errors were encountered: