WebReflection / hyperHTML

A Fast & Light Virtual DOM Alternative
ISC License
3.07k stars 112 forks source link

Is the new comment pattern expected? #300

Closed saschanaz closed 5 years ago

saschanaz commented 5 years ago

Oops, I hit enter too early.

I found that 2.19 now emits <!-- -0.534247% --> rather than previous <!-- _hyper: -1946284234; -->. Is this expected? We in ReSpec has been filtering the comments out based on _hyper: prefix, so this is an observable change.

WebReflection commented 5 years ago

Yes, the comment content has changed to avoid SVG issues with numeric attributes 'cause browser throws errors instead of ignoring unexpected values.

There are also two kind of UIDs, one numeric and one as property, because of IE, that's why.

If I knew somebody was using hyperHTML internals indirectly I would've warned but the TL;DR story is that you shouldn't, IMO, but since I believe there is a reason I can help you with details, if necessary, but I don't think it's more complex than this:

https://github.com/WebReflection/domtagger/blob/master/esm/constants.js#L3-L5

Please also note there are no spaces around.

saschanaz commented 5 years ago

Thank you for the explanation! I had to make sure this is a stable change.

WebReflection commented 5 years ago

Thank you for the explanation! I had to make sure this is a stable change.

It's been tested in every browser I could and all warnings are gone with either regular attributes, style, or SVG numeric values so it's more than stable now.

Apologies for the inconvenience though, if I need to do extra changes I'll ping you back.

Cheers