{"action":"closed","issue":{"url":"https://api.github.com/repos/ZeeCoder/clam/issues/7","labels_url":"https://api.github.com/repos/ZeeCoder/clam/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/ZeeCoder/clam/issues/7/comments","events_url":"https://api.github.com/repos/ZeeCoder/clam/issues/7/events","html_url":"https://github.com/ZeeCoder/clam/issues/7","id":65637451,"number":7,"title":"Singletons should be able to run even without a main element in the DOM","user":{"login":"ZeeCoder","id":3679506,"avatar_url":"https://avatars.githubusercontent.com/u/3679506?v=3","gravatar_id":"","url":"https://api.github.com/users/ZeeCoder","html_url":"https://github.com/ZeeCoder","followers_url":"https://api.github.com/users/ZeeCoder/followers","following_url":"https://api.github.com/users/ZeeCoder/following{/other_user}","gists_url":"https://api.github.com/users/ZeeCoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ZeeCoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZeeCoder/subscriptions","organizations_url":"https://api.github.com/users/ZeeCoder/orgs","repos_url":"https://api.github.com/users/ZeeCoder/repos","events_url":"https://api.github.com/users/ZeeCoder/events{/privacy}","received_events_url":"https://api.github.com/users/ZeeCoder/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ZeeCoder/clam/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-01T08:59:03Z","updated_at":"2015-08-25T12:35:37Z","closed_at":"2015-08-25T12:35:37Z","body":"Sometimes even though we use a singleton object, in reality we don't use any of the DOM-manipulation calls, like `getHook()`.\r\n\r\nDue to this, sometimes it's just annoying that I have to create a DOM-element with the class \"jsm-a-module\" just to trigger instantiation.\r\n\r\nA good solution for this could be that if there's no representative DOM element for a singleton, then a dummy element would be created in the memory.\r\nThis way later calls to `getHook()` and similar methods wouldn't fail miserably.\r\n\r\nThe `createPrototypes()` call must be checked before of course.\r\n\r\nA counter-argument for all this is that if we don't need such DOM manipulation, maybe we should just write a regular CommonJS module instead of a clam module.\r\nThe problem is with that though if we later decide to upgrade a simple module with clam, we then have a lot of refactoring to do."}}