[{"data":1,"prerenderedAt":269},["ShallowReactive",2],{"project-4473121":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":40,"post_text":42,"what":43,"said":62,"maker_in_thread":164,"shape":174,"grid":177,"attempts":229,"same_week":230,"maker_shows":35,"maker_hidden":261,"reader_version":262,"card":263},"4473121","javascript-async-callback","Cross-browser asynchronous JS script loader w\u002Fcallbacks","title","Show HN: Cross-browser asynchronous JS script loader w\u002Fcallbacks","https:\u002F\u002Fgithub.com\u002Fniftylettuce\u002Fjavascript-async-callback","github.com","niftylettuce",1346733158,2012,45,23,524,1677,32,"shown","languages","javascript script loader","library",[24,25,26,27],"async script loader","javascript callback","cross-browser script loading","non-blocking javascript","curious",-0.299,{"positive":31,"neutral":32,"mixed":33,"critical":34},2,7,0,5,14,{"execution":37,"idea":39},{"positive":33,"critical":38},3,{"positive":31,"critical":31},[41,33,33,41,33,41,33,41,38,33,34,33,38,33,38,38,33,38,38,34,33,41,38],1,null,{"problem":44,"audience":42,"pricing":42,"motivation":52,"time_to_build":42,"stack":59,"openness":60,"stage":61,"team_size":61},{"value":45,"source":46,"evidence":47},"Synchronous script tags block rendering and execution while a JS file loads","commenter",[48],{"id":49,"by":50,"text":51},"4473414","jonny_eh","Normally, you would load javascript files by inserting a \u003Cscript src=\"whatever.js\"> tag into your HTML document's \u003CHEAD> or \u003CBODY>. The big disadvantage to that is it's…",{"value":53,"source":54,"evidence":55},"Maker wrote a small hack after realizing a need for async loading; described as a little hack rewrite","maker",[56],{"id":57,"by":11,"text":58},"4474094","EDIT: put the repo back up to not cause broken link here... and added a notice to keep people from starring it i (originally) took the repo down b\u002Fc so many people starred it and…",[],"open_source","unknown",{"praise":63,"objections":81,"requests":104,"questions":120,"alternatives":131},[64,71],{"value":65,"source":46,"evidence":66},"Good that the maker wrote their own after realizing a need",[67],{"id":68,"by":69,"text":70},"4474114","wamatt","Given that you probably didn't know about many existing solutions, it's rather great you wrote your own, after realizing a need :) I'd keep the repo up! (even if the feedback is…",{"value":72,"source":46,"evidence":73},"Handy and simplifies loading",[74,77],{"id":75,"by":50,"text":76},"4473416","Cool stuff, very handy. Next step, add dependancy support. Maybe pass in an array of scripts, along with their dependancies, and load them all in the right order.",{"id":78,"by":79,"text":80},"4473191","ashray","Nice work! Definitely simplifies stuff. Are you thinking of integrating writecapture [1] for a document.write override option ? Might be a nifty thing to do since a lot of…",[82,89,93,97],{"value":83,"source":46,"evidence":84},"Window.onload overwritten without chaining previous handlers",[85],{"id":86,"by":87,"text":88},"4473472","OmarIsmail","I'm seeing some pretty fundamental issues here. I suppose if you assume that you'll have total control of everything loaded then some of the assumptions made here may be an ok…",{"value":90,"source":46,"evidence":91},"Load check polling at 10ms is aggressive",[92],{"id":86,"by":87,"text":88},{"value":94,"source":46,"evidence":95},"Global _async variable without function scoping",[96],{"id":86,"by":87,"text":88},{"value":98,"source":46,"evidence":99},"Conditional comments hurt minifier compatibility",[100],{"id":101,"by":102,"text":103},"4473156","spicyj","Would be nice if conditional comments weren't used so that it's compatible with most JS minifiers.",[105,109,113],{"value":106,"source":46,"evidence":107},"Add dependency support with ordered loading",[108],{"id":75,"by":50,"text":76},{"value":110,"source":46,"evidence":111},"Integrate writeCapture for document.write override",[112],{"id":78,"by":79,"text":80},{"value":114,"source":46,"evidence":115},"Detect webkit prefixes by feature rather than browser sniffing",[116],{"id":117,"by":118,"text":119},"4473749","culshaw","Nice work, I would change that you are browsers sniffing to detecting variables declared in the window for webkit prefixes.",[121],{"value":122,"source":46,"evidence":123},"What advantage does this have over existing loaders",[124,127],{"id":125,"by":69,"text":126},"4474074","Nifty, thanks for sharing. :) Also, as others have mentioned, there are plenty of options out there, so it might be useful highlight any specific difference or advantage this…",{"id":128,"by":129,"text":130},"4473155","alagappanr","The question might be naive, but can you tell me the advantage of using this?",[132,139,146,153,157],{"value":133,"source":46,"evidence":134},"LABjs",[135],{"id":136,"by":137,"text":138},"4473587","scriby","Not sure why I would use this when other solutions like LABjs are rock solid, fully featured, and small (~2k zipped). http:\u002F\u002Flabjs.com\u002F",{"value":140,"source":46,"evidence":141},"yepnope",[142],{"id":143,"by":144,"text":145},"4473690","huskyr","I wrote something similar some time ago: https:\u002F\u002Fgithub.com\u002Fhay\u002Fjsdynaload Allows you to do something like this: jsDynaLoad(['1.js', '2.js', '3.js'], function() {…",{"value":147,"source":46,"evidence":148},"RequireJS",[149],{"id":150,"by":151,"text":152},"4473186","jonthepirate","Similar to require.js but I like it!",{"value":154,"source":46,"evidence":155},"curl.js",[156],{"id":125,"by":69,"text":126},{"value":158,"source":46,"evidence":159},"GA.js-style array push technique",[160],{"id":161,"by":162,"text":163},"4473268","taf2","thank you for posting code! the problem with this solution is you had to include a blocking js script first to use it... a better solution is to inject your script and for…",{"comments":165,"answered":41,"key":166},4,[167,168,171],{"id":57,"text":58},{"id":169,"text":170},"4474142","done, put a notice on the repo though",{"id":172,"text":173},"4474102","see http:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=4474094",{"commenters":175,"max_depth":165,"maker_replies":165,"first_comment_mins":176,"lifespan_hours":176},18,9,[178,180,184,187,189,192,193,197,198,200,202,204,205,209,210,212,214,215,217,220,222,225,227],[86,33,41,179,87,33],"project\u002Fcritical\u002Fexecution",[181,33,33,182,183,33],"4473644","commenter\u002Fneutral\u002Fnone","phoboslab",[185,33,33,182,186,33],"4474447","anatoli",[161,41,41,188,162,33],"project\u002Fcritical\u002Fidea",[190,41,33,182,191,33],"4473548","muyuu",[136,31,41,188,137,33],[194,38,33,195,196,33],"4473670","other\u002Fneutral\u002Fnone","przemoc",[101,165,41,179,102,33],[125,34,38,199,69,33],"project\u002Fneutral\u002Fnone",[57,34,33,201,11,41],"maker\u002Fneutral\u002Fnone",[68,34,34,203,69,33],"maker\u002Fpositive\u002Fidea",[169,34,33,201,11,41],[206,207,38,199,208,33],"4474100",6,"teh_klev",[172,207,33,201,11,41],[75,32,38,211,50,33],"project\u002Fneutral\u002Fidea",[78,213,38,211,79,33],8,[143,176,33,195,144,33],[128,216,38,211,129,33],10,[218,216,38,211,219,33],"4473326","pizza",[49,216,34,221,50,33],"project\u002Fpositive\u002Fidea",[223,224,33,195,11,41],"4474297",11,[117,226,41,179,118,33],12,[150,228,38,211,151,33],13,[],[231,236,241,246,251,256],{"id":232,"name":233,"points":234,"category":235},"4466883","GitHub résumé (resume.github.com)",301,"productivity",{"id":237,"name":238,"points":239,"category":240},"4459826","WikiLoopr",295,"learning_science",{"id":242,"name":243,"points":244,"category":245},"4462315","Mixest",219,"consumer_social",{"id":247,"name":248,"points":249,"category":250},"4460299","Beatmatic",130,"creative",{"id":252,"name":253,"points":254,"category":255},"4453967","Cycling Analytics",66,"dev_tools",{"id":257,"name":258,"points":259,"category":260},"4452553","Gaglers",47,"web_saas",false,"v2",{"id":264,"name":5,"line":6,"ai":261,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":265,"top":18,"kw":266,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":267,"url":9,"mix":268,"praise":65,"objection":83,"sub":21},4473121,-0.3,[24,25,26,27],"10010101305030330335013",[31,32,33,34],1794036499181]