Follow-up Comment #4, bug #576 (project tex4ht):
Ideally, you can define the \FooCmd and \EndFooCmd in the preamble, or in a
custom package, and then redefine it in TeX4ht configuration file:
%%%
\documentclass{article}
\NewDocumentEnvironment{foo}{+b}{}{}
\long\def\FooCmd #1\
Follow-up Comment #3, bug #576 (project tex4ht):
Michal, related question: is there a nicer way than \ifx\HCode\undefined to
test "are we running under tex4ht"? Clearly the \ScriptEnv construct, etc.,
need to be conditionalized ...
thanks.