diff --git a/devtools/server/actors/highlighters/utils/markup.js b/devtools/server/actors/highlighters/utils/markup.js index 7e4c48811fa9..5433f362cebd 100644 --- a/devtools/server/actors/highlighters/utils/markup.js +++ b/devtools/server/actors/highlighters/utils/markup.js @@ -265,20 +265,6 @@ CanvasFrameAnonymousContentHelper.prototype = { } let doc = this.highlighterEnv.document; - // On B2G, for example, when connecting to keyboard just after startup, - // we connect to a hidden document, which doesn't accept - // insertAnonymousContent call yet. - if (doc.hidden) { - // In such scenario, just wait for the document to be visible - // before injecting anonymous content. - let onVisibilityChange = () => { - doc.removeEventListener("visibilitychange", onVisibilityChange); - this._insert(); - }; - doc.addEventListener("visibilitychange", onVisibilityChange); - return; - } - // For now highlighters.css is injected in content as a ua sheet because //