Cool.
Taktik proposed something here:
https://forum.renoise.com/t/idea-for-a-simple-advanced-edit-scripting/18824
I would need PHP5 support as I would not write scripts in JS. Others would need their own languages (Python, Perl, Ruby, Etc.) supported. I vote no on a XTHML/JS implementation, yes on a generic implementation. You could use Rhino Shell ?