Handle situation where iframe already has the given URL open
This commit is contained in:
parent
d07e88192b
commit
6076dd97af
1 changed files with 7 additions and 0 deletions
|
@ -47,6 +47,13 @@ function DisplayParticipant(broker, role, defaultUrls, timer) {
|
||||||
urls = indata;
|
urls = indata;
|
||||||
callback('urls', null, urls);
|
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.onerror = (err) => {
|
||||||
next.onload = null;
|
next.onload = null;
|
||||||
next.onerror = null;
|
next.onerror = null;
|
||||||
|
|
Loading…
Reference in a new issue