{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/loader/issues/7","labels_url":"https://api.github.com/repos/whatwg/loader/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/loader/issues/7/comments","events_url":"https://api.github.com/repos/whatwg/loader/issues/7/events","html_url":"https://github.com/whatwg/loader/issues/7","id":52635690,"number":7,"title":"Multiple instances of Loader","user":{"login":"sheerun","id":292365,"avatar_url":"https://avatars.githubusercontent.com/u/292365?v=3","gravatar_id":"","url":"https://api.github.com/users/sheerun","html_url":"https://github.com/sheerun","followers_url":"https://api.github.com/users/sheerun/followers","following_url":"https://api.github.com/users/sheerun/following{/other_user}","gists_url":"https://api.github.com/users/sheerun/gists{/gist_id}","starred_url":"https://api.github.com/users/sheerun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheerun/subscriptions","organizations_url":"https://api.github.com/users/sheerun/orgs","repos_url":"https://api.github.com/users/sheerun/repos","events_url":"https://api.github.com/users/sheerun/events{/privacy}","received_events_url":"https://api.github.com/users/sheerun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2014-12-22T10:09:47Z","updated_at":"2015-03-11T22:53:32Z","closed_at":null,"body":"Just heads up, it's important for some developers to be able to instantiate Loader multiple times:\r\n\r\nhttps://github.com/systemjs/systemjs/issues/60#issuecomment-40291070\r\n\r\nPlease don't make System a singleton, but only a default instance. Also class-based approach is desired."},"comment":{"url":"https://api.github.com/repos/whatwg/loader/issues/comments/78390461","html_url":"https://github.com/whatwg/loader/issues/7#issuecomment-78390461","issue_url":"https://api.github.com/repos/whatwg/loader/issues/7","id":78390461,"user":{"login":"dherman","id":307871,"avatar_url":"https://avatars.githubusercontent.com/u/307871?v=3","gravatar_id":"","url":"https://api.github.com/users/dherman","html_url":"https://github.com/dherman","followers_url":"https://api.github.com/users/dherman/followers","following_url":"https://api.github.com/users/dherman/following{/other_user}","gists_url":"https://api.github.com/users/dherman/gists{/gist_id}","starred_url":"https://api.github.com/users/dherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dherman/subscriptions","organizations_url":"https://api.github.com/users/dherman/orgs","repos_url":"https://api.github.com/users/dherman/repos","events_url":"https://api.github.com/users/dherman/events{/privacy}","received_events_url":"https://api.github.com/users/dherman/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T22:53:31Z","updated_at":"2015-03-11T22:53:31Z","body":"> But even if we didn't go this way you absolutely need to have access to the loader from within hooks.\r\n\r\nSure, but there are plenty of ways to have access to the loader via lexical scope. IINM the only question is whether you want to make use of inheritance e.g. to reuse a particular hook implementation without having to explicitly parameterize it over a loader; you get the loader for free via `this`. Which is fine, I think.\r\n\r\n> Calling the hooks externally could be useful when you want the all of the extension behavior to be applied.\r\n\r\nHm, maybe. I mean I could just not worry about it; there are only four hooks. But there are is one name collision (`resolve`) and one \"conceptual\" collision (`load` vs `fetch`). And still the *purpose* of these is as hooks, not as external methods. I think I'm more comfortable with a name convention. Is `onfoo` too cute? /me muses..."}}