javascript-async-callback

Languages and libraries

javascript script loader

SHOW HN2012

45points
23comments
#524of 1,677 in 2012
Top 32%of 2012 by points

How HN took it

CuriousMostly questions and neutral comments

2 positive, 7 neutral or asking, 0 mixed, 5 critical, out of 14 comments about the project. Thread score -0.30.

Idea: 2 for, 2 againstExecution: 0 for, 3 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Good that the maker wrote their own after realizing a need

    From 1 comment
    • 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…
      wamatt on HN
  • Handy and simplifies loading

    From 2 comments
    • 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.
      jonny_eh on HN
    • 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…
      ashray on HN

Objections

  • Window.onload overwritten without chaining previous handlers

    From 1 comment
    • 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…
      OmarIsmail on HN
  • Load check polling at 10ms is aggressive

    From 1 comment
    • 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…
      OmarIsmail on HN
  • Global _async variable without function scoping

    From 1 comment
    • 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…
      OmarIsmail on HN
  • Conditional comments hurt minifier compatibility

    From 1 comment
    • Would be nice if conditional comments weren't used so that it's compatible with most JS minifiers.
      spicyj on HN

Requests

  • Add dependency support with ordered loading

    From 1 comment
    • 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.
      jonny_eh on HN
  • Integrate writeCapture for document.write override

    From 1 comment
    • 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…
      ashray on HN
  • Detect webkit prefixes by feature rather than browser sniffing

    From 1 comment
    • Nice work, I would change that you are browsers sniffing to detecting variables declared in the window for webkit prefixes.
      culshaw on HN

Questions

  • What advantage does this have over existing loaders

    From 2 comments
    • 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…
      wamatt on HN
    • The question might be naive, but can you tell me the advantage of using this?
      alagappanr on HN

Alternatives named

  • LABjs

    From 1 comment
    • Not sure why I would use this when other solutions like LABjs are rock solid, fully featured, and small (~2k zipped). http://labjs.com/
      scriby on HN
  • yepnope

    From 1 comment
    • I wrote something similar some time ago: https://github.com/hay/jsdynaload Allows you to do something like this: jsDynaLoad(['1.js', '2.js', '3.js'], function() {…
      huskyr on HN
  • RequireJS

    From 1 comment
  • curl.js

    From 1 comment
    • 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…
      wamatt on HN
  • GA.js-style array push technique

    From 1 comment
    • 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…
      taf2 on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/4473121)