There is a new CSS API for Custom Highlighting, which is now pretty well supported across browsers: https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API
This would be useful, I think, for ssHighlight, which would then not need to insert <mark> elements on the page.