I see a lot of reference for replacing text between tags or replacing tags identified with an ID, but my task is quite different in that I need to replace part of the tag itself. For example, I want to change…
<body etc>
So that it becomes…
<body somestring etc>
The change needs to be performed in the browser using JavaScript, ie: after a CMS (like WordPress) has finished with it.
Looks like you need to add new attribute to DOM element: