Update inject.js (#346)

This commit is contained in:
Can Arslan
2018-06-16 18:39:46 +02:00
committed by Ilya Grigorik
parent 1718872d98
commit 4e96e57e7d

View File

@@ -228,8 +228,11 @@ chrome.runtime.sendMessage({}, function(response) {
document.head.appendChild(link);
}
var docs = Array(document)
if(inIframe())
docs.push(window.top.document);
try {
if (inIframe())
docs.push(window.top.document);
} catch (e) {
}
docs.forEach(function(doc) {
doc.addEventListener('keydown', function(event) {