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

    <bdo id='UD3C9'></bdo><ul id='UD3C9'></ul>

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

    1. <tfoot id='UD3C9'></tfoot>
      <legend id='UD3C9'><style id='UD3C9'><dir id='UD3C9'><q id='UD3C9'></q></dir></style></legend>
      1. <small id='UD3C9'></small><noframes id='UD3C9'>

        Jquery *編譯器*可能嗎?

        Is Jquery *compiler* possible?(Jquery *編譯器*可能嗎?)
          <i id='xKut4'><tr id='xKut4'><dt id='xKut4'><q id='xKut4'><span id='xKut4'><b id='xKut4'><form id='xKut4'><ins id='xKut4'></ins><ul id='xKut4'></ul><sub id='xKut4'></sub></form><legend id='xKut4'></legend><bdo id='xKut4'><pre id='xKut4'><center id='xKut4'></center></pre></bdo></b><th id='xKut4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xKut4'><tfoot id='xKut4'></tfoot><dl id='xKut4'><fieldset id='xKut4'></fieldset></dl></div>
            <tbody id='xKut4'></tbody>

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

              <legend id='xKut4'><style id='xKut4'><dir id='xKut4'><q id='xKut4'></q></dir></style></legend>
                  <bdo id='xKut4'></bdo><ul id='xKut4'></ul>
                • <tfoot id='xKut4'></tfoot>
                  本文介紹了Jquery *編譯器*可能嗎?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  當我看到 這個問題時,我想如果可以編寫 jQuery compiler 將會很有幫助.現在,編譯器是指接收 jQuery 代碼并輸出最終執行的原始 javascript 代碼的東西.

                  When I saw this question I thought it would be helpful if a jQuery compiler could be written. Now, by compiler, I mean something that takes in jQuery code and outputs raw javascript code that is ultimately executed.

                  這就是我對 jQuery 代碼執行塊的設想:

                  This is how I vision a block of jQuery code execution:

                  1. 調用一個 jQuery 函數并將參數傳遞給它
                  2. 該函數調用一個原始的 javascript 函數并將它收到的參數傳遞給它
                  3. 新調用的函數執行預期的操作

                  我知道這是一個非常簡化的模型,它可能要復雜得多,但我認為復雜性降低到重復第 2 步和第 3 步,并調用不同的原始 js 函數,并且每個使用所有或部分參數/先前結果的時間.

                  I understand that this is a very simplified model and it could be much more complex, but I think the complexity is reduced to steps 2 and 3 being repeated with different raw js functions being called and each time fed with all or a subset of parameters / previous results.

                  如果我們訂閱該模型,那么我們可能會想出一些方法來讓 jQuery 函數執行雙重任務:

                  If we subscribe to that model, then we might come up with methods to make the jQuery functions perform double-duty:

                  1. 他們已經做了什么
                  2. raw_function(passed_pa??rams)
                  3. 的形式記錄他們所做的事情
                  1. What they already do
                  2. Logging what they did in form of raw_function(passed_params)

                  我是否做出了一些錯誤的假設,使這成為不可能?任何想法 Firebug 的探查器如何嘗試獲取函數名稱?可以用在這里嗎?

                  Am I making some wrong assumptions that would make this impossible? Any ideas how Firebug's profiler attempts to get function names? Could it be used here?

                  編輯

                  我的想法是制作一個輸入/輸出為的黑盒:

                  What I was thinking was making a black box with input / output as:

                  普通 jquery 代碼[BB]如果你不使用庫你會寫的代碼

                  • 我稱它為編譯器,因為您編譯一次,然后就會使用生成的代碼.
                  • 我認為它至少可以用于教育,也可能有其他用途.
                  • 人們說這會占用少量代碼并輸出大量代碼;據我所知,這并沒有違背預期的目的
                  • 人們說我會在頁面渲染中添加一個額外的、不必要的步驟,鑒于最終只會使用生成的代碼(并且可能僅用于學習),這是不正確的.
                  • 人們說javascript函數和jquery函數之間沒有一對一的關系,并暗示這樣的轉換器太復雜了,可能不值得努力.我現在同意這一點.
                  • I called this a compiler, because you compiled once and then would use the resulting code.
                  • I argued that it could have at least educational use, and probably other uses as well.
                  • People said this would take in a small amount of code and output a huge mass; that does not defy the intended purpose as far as I see
                  • People said I'd be adding an extra, needless step to page rendering, which, given only the resulting code would ultimately be used (and probably be used just for studying), is not correct.
                  • People said there is no one-to-one relation between javascript functions and jquery functions, and implied such a converter would be too complicated and probably not worth the effort. With this I now agree.

                  謝謝大家!

                  推薦答案

                  我想你的意思是:如果你寫

                  I think what you mean is: if you write

                  var myId = $("#myId")
                  

                  它將被轉換為

                  var myId = document.getElementById("myId")
                  

                  我認為可能,但問題是,jQuery 函數返回 jQuery 對象,所以在上面的例子中,第一個 myId 將是一個 jQuery 對象 &第二個將是一個節點對象(我認為),它將影響編譯后在代碼中稍后需要使用它的其他功能.特別是如果他們被鎖住了

                  I think its possible, but the problem is, jQuery functions return jQuery objects, so in the above example, the first myId will be a jQuery object & the second will be a node object(i think) which will affect other functions that needs to use it later in the code after compilation. Especially if they are chained

                  其次,您必須確保轉換確實具有性能優勢.但是,如果您了解所有這些并且可以相應地計劃您的代碼,我認為這是可能的

                  secondly you will have to be sure that the conversion actually has performance benefits. However if you are aware of all this and you can plan you code accordingly, i think it will be possible

                  這篇關于Jquery *編譯器*可能嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)

                  <small id='QkdB9'></small><noframes id='QkdB9'>

                  <legend id='QkdB9'><style id='QkdB9'><dir id='QkdB9'><q id='QkdB9'></q></dir></style></legend>
                      <bdo id='QkdB9'></bdo><ul id='QkdB9'></ul>

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

                          1. 主站蜘蛛池模板: 亚洲精品电影在线 | 可以在线观看av的网站 | www.黄色在线观看 | 黄色网址在线免费观看 | 成人在线精品 | www.xxxx欧美| 日日碰狠狠躁久久躁96avv | 亚洲欧美一区二区三区在线 | av网站在线免费观看 | 91日韩 | 亚洲精品欧美 | 亚洲精美视频 | 国产精品欧美一区二区三区不卡 | 精品欧美一区二区在线观看视频 | 欧美一级在线观看 | 秋霞精品 | 91精品久久久久久久久中文字幕 | 中文字幕国产日韩 | 日韩一区不卡 | 国产亚洲精品综合一区 | 国产一区二区视频在线观看 | 欧美一级在线观看 | 久久精品国产99国产精品 | 日韩成人在线一区 | 国产欧美一区二区久久性色99 | 在线成人av | av在线免费观看网址 | 日本精品裸体写真集在线观看 | 亚洲1区 | 成人片免费看 | 国产精品中文在线 | 毛片网站在线观看 | 黄色片在线 | 欧美黄 片免费观看 | 狠狠干网站 | 久久久久久国产精品 | 玖玖国产精品视频 | 色婷婷综合久久久中字幕精品久久 | 精品色| 日韩欧美在线视频 | 欧美激情视频一区二区三区免费 |