Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#14177 closed enhancement (fixed)

domReady! should pass doc as argument to callback

Reported by: Adam Peller Owned by: Rawld Gill
Priority: high Milestone: 1.8
Component: Core Version: 1.6.1
Keywords: Cc: ben hockey, rawld
Blocked By: Blocking:

Description

I think requirejs does it this way

Change History (4)

comment:1 Changed 8 years ago by ben hockey

off the top of my head, the patch would be something like this but i haven't tried it.

  • domReady.js

     
    1919                               if(fixReadyState){ doc.readyState = "complete"; }
    2020
    2121                               while(readyQ.length){
    22                                        (readyQ.shift())();
     22                                       (readyQ.shift())(doc);
    2323                               }
    2424                       },
    2525                       on = function(node, event){
     
    8282
    8383       function domReady(callback){
    8484               if(ready){
    85                        callback(1);
     85                       callback(doc);
    8686               }else{
    8787                       readyQ.push(callback);

comment:2 Changed 8 years ago by bill

Owner: set to Rawld Gill
Status: newassigned

comment:3 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [29156]:

make domReady plugin work like requirejs's domReady plugin; fixes #14177; !strict

comment:4 Changed 7 years ago by Rawld Gill

Milestone: tbd1.8
Note: See TracTickets for help on using tickets.