Updated document.write() to behave properly. It now appends all new content after the currently executing script element, if called during the first tick of that script (that is, before control is returned to JSDOM). This replaces checking whether the page is loading or not.
Updated document.write() to behave properly.
It now appends all new content after the currently executing script element, if called during the first tick of that script (that is, before control is returned to JSDOM). This replaces checking whether the page is loading or not.

sirbrillig/jsdom,janusnic/jsdom,snuggs/jsdom,vestineo/jsdom,darobin/jsdom,crealogix/jsdom,Ye-Yong-Chi/jsdom,Ye-Yong-Chi/jsdom,medikoo/jsdom,AshCoolman/jsdom,jeffcarp/jsdom,kesla/jsdom,janusnic/jsdom,robertknight/jsdom,aduyng/jsdom,danieljoppi/jsdom,selam/jsdom,nicolashenry/jsdom,nicolashenry/jsdom,evdevgit/jsdom,mbostock/jsdom,AVGP/jsdom,susaing/jsdom,sirbrillig/jsdom,aduyng/jsdom,szarouski/jsdom,lcstore/jsdom,beni55/jsdom,Sebmaster/jsdom,mbostock/jsdom,mbostock/jsdom,fiftin/jsdom,szarouski/jsdom,robertknight/jsdom,jeffcarp/jsdom,snuggs/jsdom,nicolashenry/jsdom,vestineo/jsdom,fiftin/jsdom,beni55/jsdom,vestineo/jsdom,Sebmaster/jsdom,kevinold/jsdom,kesla/jsdom,kittens/jsdom,medikoo/jsdom,selam/jsdom,danieljoppi/jsdom,evanlucas/jsdom,zaucy/jsdom,sebmck/jsdom,papandreou/jsdom,Joris-van-der-Wel/jsdom,AVGP/jsdom,tmpvar/jsdom,robertknight/jsdom,evdevgit/jsdom,danieljoppi/jsdom,aduyng/jsdom,AshCoolman/jsdom,Joris-van-der-Wel/jsdom,jeffcarp/jsdom,mzgol/jsdom,fiftin/jsdom,selam/jsdom,susaing/jsdom,mzgol/jsdom,kesla/jsdom,Ye-Yong-Chi/jsdom,sebmck/jsdom,kangax/jsdom,kangax/jsdom,kittens/jsdom,dexteryy/jsdom-nogyp,beni55/jsdom,evanlucas/jsdom,cpojer/jsdom,sebmck/jsdom,darobin/jsdom,evanlucas/jsdom,janusnic/jsdom,kevinold/jsdom,kittens/jsdom,concord-consortium/jsdom,cpojer/jsdom,mzgol/jsdom,szarouski/jsdom,dexteryy/jsdom-nogyp,evdevgit/jsdom,concord-consortium/jsdom,Zirro/jsdom,tmpvar/jsdom,crealogix/jsdom,lcstore/jsdom,zaucy/jsdom,susaing/jsdom,papandreou/jsdom,lcstore/jsdom,kevinold/jsdom,medikoo/jsdom,zaucy/jsdom,sirbrillig/jsdom,cpojer/jsdom,Zirro/jsdom,Joris-van-der-Wel/jsdom,Sebmaster/jsdom,darobin/jsdom,AshCoolman/jsdom