SPFX – Injecting custom javascript at runtime from property pane field

How is it that libraries like StratusForms are able to provide property panes for users to write custom javascript on the fly and inject that into the page? I don’t understand the fundamental basic principles that allow for that to happen.