Okay, I see that in other places in the Sigil source code I already call:
Code:
m_Book->GetOPF()->UpdateManifestProperties(resources);
on a limited set of resources.
So I was being a big hypocrite saying "we should not" when we already do in two other places in the source code. I had forgotten about them. And I hate being a hypocrite.
So I have decided to run UpdateManifestProperties on just the resources touched by linking of the javascripts in that routine.
**BUT** [climbs back on to my soapbox!]
I still think it is really really important to run UpdateManifestProperties on *all* xhtml resources as one of the final steps since just text editing can create the need for it and there is no way for Sigil to easily tell if it is needed.