久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='7Q609'></tfoot>

        <bdo id='7Q609'></bdo><ul id='7Q609'></ul>

      1. <i id='7Q609'><tr id='7Q609'><dt id='7Q609'><q id='7Q609'><span id='7Q609'><b id='7Q609'><form id='7Q609'><ins id='7Q609'></ins><ul id='7Q609'></ul><sub id='7Q609'></sub></form><legend id='7Q609'></legend><bdo id='7Q609'><pre id='7Q609'><center id='7Q609'></center></pre></bdo></b><th id='7Q609'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7Q609'><tfoot id='7Q609'></tfoot><dl id='7Q609'><fieldset id='7Q609'></fieldset></dl></div>
      2. <small id='7Q609'></small><noframes id='7Q609'>

        <legend id='7Q609'><style id='7Q609'><dir id='7Q609'><q id='7Q609'></q></dir></style></legend>

        等待 document.body 存在

        Wait for document.body existence(等待 document.body 存在)
        <i id='eC4xg'><tr id='eC4xg'><dt id='eC4xg'><q id='eC4xg'><span id='eC4xg'><b id='eC4xg'><form id='eC4xg'><ins id='eC4xg'></ins><ul id='eC4xg'></ul><sub id='eC4xg'></sub></form><legend id='eC4xg'></legend><bdo id='eC4xg'><pre id='eC4xg'><center id='eC4xg'></center></pre></bdo></b><th id='eC4xg'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='eC4xg'><tfoot id='eC4xg'></tfoot><dl id='eC4xg'><fieldset id='eC4xg'></fieldset></dl></div>
        <tfoot id='eC4xg'></tfoot>
          <tbody id='eC4xg'></tbody>

            1. <small id='eC4xg'></small><noframes id='eC4xg'>

                • <bdo id='eC4xg'></bdo><ul id='eC4xg'></ul>
                • <legend id='eC4xg'><style id='eC4xg'><dir id='eC4xg'><q id='eC4xg'></q></dir></style></legend>
                • 本文介紹了等待 document.body 存在的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我編寫了一個 Chrome 擴展程序,可以在頁面加載之前運行(使用屬性 run_at":document_start").問題是我想在創建后立即將 div 標記添加到網頁正文.在那之前 document.body 是空的,所以我不能給它附加標簽.

                  I wrote a Chrome extension that works before the page is loaded (using the attribute "run_at": "document_start"). The problem is that I want to add a div tag to the web page body as soon as it is created. Before that document.body is null so I can't append tags to it.

                  我不在乎身體的滿負荷,我只需要它存在.

                  I don't care about full load of the body, I just need it to be existent.

                  我正在嘗試找到在創建 html 中的 body 標記(未完全加載,只是創建)時發出警報的最佳方法.我可以為這種情況編寫任何事件處理程序嗎?

                  I am trying to find the best way to be alerted when the body tag in html is created (not loaded fully, just created). Is there any event handler for this case that I can write?

                  另外,我不想使用 jQuery 或任何其他非內置庫.

                  Also, I don't want to use jQuery or any other non built-in library.

                  推薦答案

                  你可以使用 document.documentElement 上的 ">mutation observer 監聽對其 childList 的更改并查看添加的內容是否為 body.

                  You could use a mutation observer on document.documentElement listening for changes to its childList and looking to see whether the thing that got added is body.

                  示例:Live Copy

                  <!DOCTYPE html>
                  <html>
                  <head>
                    <meta charset="utf-8">
                    <title>Example</title>
                    <script>
                      (function() {
                        "use strict";
                  
                        var observer = new MutationObserver(function() {
                          if (document.body) {
                            // It exists now
                            document.body.insertAdjacentHTML(
                              "beforeend",
                              "<div>Found <code>body</code></div>"
                            );
                            observer.disconnect();
                          }
                        });
                        observer.observe(document.documentElement, {childList: true});
                      })();
                    </script>
                  </head>
                  <body>
                    <div id="foo"></div>
                  </body>
                  </html>
                  

                  這篇關于等待 document.body 存在的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Use IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
                  anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 項目中不起作用)
                  Ionic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用異步數據更新 Observable)
                  Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                  In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何創建使用 Ionic 組件的自定義指令?)
                  Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態元素 - Angular 2 amp;離子2)
                    <legend id='5kxxu'><style id='5kxxu'><dir id='5kxxu'><q id='5kxxu'></q></dir></style></legend>

                    <small id='5kxxu'></small><noframes id='5kxxu'>

                      1. <tfoot id='5kxxu'></tfoot>
                      2. <i id='5kxxu'><tr id='5kxxu'><dt id='5kxxu'><q id='5kxxu'><span id='5kxxu'><b id='5kxxu'><form id='5kxxu'><ins id='5kxxu'></ins><ul id='5kxxu'></ul><sub id='5kxxu'></sub></form><legend id='5kxxu'></legend><bdo id='5kxxu'><pre id='5kxxu'><center id='5kxxu'></center></pre></bdo></b><th id='5kxxu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5kxxu'><tfoot id='5kxxu'></tfoot><dl id='5kxxu'><fieldset id='5kxxu'></fieldset></dl></div>
                          • <bdo id='5kxxu'></bdo><ul id='5kxxu'></ul>

                              <tbody id='5kxxu'></tbody>
                            主站蜘蛛池模板: 天天干天天爱天天操 | 精品国产乱码久久久久久丨区2区 | 国产伦精品一区二区三区精品视频 | 精品国产欧美一区二区 | 中文亚洲视频 | 日韩一级欧美一级 | 亚洲欧美视频在线观看 | 中文字幕免费视频 | 午夜a v电影 | 国产亚洲欧美在线视频 | 蜜桃视频麻豆 | www.亚洲精品 | 亚洲成人一区 | 精品日韩在线 | 最新国产福利在线 | 欧美xxxx黑人又粗又长 | 瑞克和莫蒂第五季在线观看 | 九九热久久免费视频 | 亚洲国产aⅴ成人精品无吗 综合国产在线 | 男女羞羞视频在线看 | 国产视频黄色 | 在线成人精品视频 | 欧美一区视频在线 | 久久久久中文字幕 | 国产精品美女久久久久久久久久久 | 国产精品无码专区在线观看 | 亚洲欧美中文日韩在线v日本 | 精精国产xxxx视频在线播放7 | 久草视频2| 毛色毛片免费看 | 国产激情视频在线 | 国产日韩欧美一区二区 | 国产精品久久久久无码av | 亚洲香蕉在线视频 | 福利久久 | 久久麻豆精品 | 精品久久久久久久 | 国产色网站 | 日韩一区二区在线视频 | 欧美中文字幕在线观看 | 亚洲一二三区在线观看 |