Releases: alienzhou/web-highlighter
Releases · alienzhou/web-highlighter
v0.7.4
Fix
Removing unsupported APIs to fix compatibility issues in IE11:
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.0
Features
- Add
.getExtraIdByDom
instance method which helps get extra ids from a wrapper. more>> - Add a new hook:
Serialize.Restore
. You can use it to customize your own restoring method. When you tap this hook, the HighlightSource instance will use the function you pass to calculate the start and end nodes' info. more>> - Support remove function in hooks. Now
hook.tap()
will return a function for removing it. Besides, you can also callhook.remove()
to remove a tapped function.
Fix
- When pre&next nodes are empty texts, the text node's wrapper should not be split.
- Avoid add duplicate functions to a hook.
Other updates
- Add unit tests for hook, event emitter and new features.
- Use unknown type instead of any.
v0.5.2
Features
- Support verbose configuration. It decides whether warning&error message will be output.
- Add a static method
.isHighlightWrapNode()
. You can use it to test whether a node(DOM) is a highlight wrapper.
Fix
- Prevent emit REMOVE event when no node is affected by calling
.remove()
and.removeAll()
- Fix the bug in
.getAll
, now it will return correct data - Prevent injecting duplicate stylesheets when one has been injected
Other updates
- Add a suit of unit tests to ensure the code quality.
- Refactor the way of error reporting.
- Remove
.dataset
polyfill.
v0.5.1
v0.6.0-beta.0
Features
- add a new hook:
Serialize.Restore
Customize your own restoring method. When you tap this hook, the
HighlightSource
instance will use the function you pass to calculate the start and end nodes' info.