I think we've recently added this type of node loading into lazy loader, it's simple enough, so up to you: https://github.com/mozilla-b2g/gaia/blob/master/shared/js/lazy_loader.js#L38

(Unforunately you do have to pass in the actual node - perhaps we should also allow for a querySelector approach)