I'll have to look at jinja some more, but does it give you control over the actual compilation? Why would you need this instead of just hooking into the parser, where your block generates the appropriate nodes for compilation?

This gives a lot of control to extensions, and if they are emitting raw js source that is bad because you need to be careful what you output (you could clobber variable names, etc).