Skip to content

v0.6.0

Compare
Choose a tag to compare
@alienzhou alienzhou released this 20 May 17:31
· 46 commits to master since this release

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 call hook.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.