Using JS, Leverage DOM events to dynamically load extensions to a web library