studentIvan/dueljs

before create channel window.isMaster() always false

devrow opened this issue · 0 comments

//var channel = duel.channel('test');
document.addEventListener("visibilitychange", function() {
    console.log("Visible: " + !document.hidden);
    console.log("Master: " + window.isMaster());
});

in theory, the number of channels should not affect the function isMaster ()