It's kind of icky to try and use the code block sampler outside of jsc which makes finding perf bugs in the dom hard. This bug covers some basic tidying to make it not so jsc dependent.
Created attachment 40281 [details] Patch v1
Committed in r48905