web-highlighter
web-highlighter copied to clipboard
会高亮实例化根元素以外的元素。
也许这可能会有所帮助,我修复它的方法是在初始化期间设置 exceptSelectors: [] 选项以排除外部元素我还确保用作容器的 DOM 元素已添加到页面中,因为如果找不到它并且它是 等于 null,荧光笔将使用整个文档作为后备。
Maybe this could help, the way I fixed it is by setting the exceptSelectors: [] option during initialisation to exclude external elements also I made sure the DOM element used as container has been added to the page because if it is not found and it is equal to null, the highlighter will use the whole document as fallback.
传入根元素的HTMLElement但是依然会高亮根元素之外的节点