It looks like hyperhtml is adding weird comments to nodes that it changes, that look like <!---0.461211%-->. This is failing our nightwatch tests, which use innnerHTML to compare before and after dom content, which is including this bizarre comment. Is it hyperhtml that is adding this? Is it possible for me to disable this comment?
From my understanding those comments are vital to how hyperHTML works. I
don鈥檛 know the exact inner workings, but I believe it uses the exact nodes
those comments create to be able to re-render content in a highly efficient
manner.
Is it hyperhtml that is adding this?
Yes.
Is it possible for me to disable this comment?
No, that's how hyperHTML, or lit-html, or anything that needs to understand where your holes in your template literals were, reflects on the DOM.
This is failing our nightwatch tests, which use innnerHTML
Don't use innerHTML, it's been bad since day zero, why would you trust it for tests at all?
P.S. you can, however, just remove /<!--(?:-?\d\.\d+%)-->/g out of the equation, and you might be good to go with your innerHTML based tests 馃憢
Most helpful comment
From my understanding those comments are vital to how hyperHTML works. I
don鈥檛 know the exact inner workings, but I believe it uses the exact nodes
those comments create to be able to re-render content in a highly efficient
manner.