Handle situation where iframe already has the given URL open

This commit is contained in:
Henri Bergius 2017-11-28 22:32:18 +01:00
parent d07e88192b
commit 6076dd97af

View file

@ -47,6 +47,13 @@ function DisplayParticipant(broker, role, defaultUrls, timer) {
urls = indata;
callback('urls', null, urls);
}
if (next.getAttribute('src') === indata) {
// Already open!
next.id = 'current';
current.id = 'next';
callback('opened', null, next.getAttribute('src'));
return;
}
next.onerror = (err) => {
next.onload = null;
next.onerror = null;