I reworked this js for UiBundle, please just a bit more of time. :) I decided to go with ``data-`` attributes to simplify this js greatly. It works in any place, anwhere, you just provide the name of prototypes container and where it should be put.