Implement ability to specify dependencies (support both contexts: Iframe/Worker)