Commit Graph

4 Commits

Author SHA1 Message Date
Yanzhen Yu
a0dc9481b2 Release 0.7.21 2019-11-09 15:28:17 +08:00
Yanzhen Yu
7203517d15 Release 0.7.19 2019-09-19 12:41:12 +08:00
Benoît Zugmeyer
5697c689d9 reuse serialized nodes ids (#12)
* reuse serialized nodes ids

With this patch, each DOM node keeps its id during its existence. This
allows to apply RRWeb events to previous snapshots if needed.

`resetId` has been removed because it loses its meaning: calling it
would not reset the existing nodes ids anymore, only the new ones.

Since we don't reset the id anymore, we may exhaust the available ids
quicker, but Number.MAX_SAFE_INTEGER (2 ** 53 - 1) is pretty large, so I
doubt this'll cause any problem.

* improv TS typing

The `nAsINode` variable was not very elegant.  Simplify this by removing
the cast, and make the INode interface compatible with Node.

* update typings
2019-05-21 17:55:43 +08:00
Yanzhen Yu
f4ebd6b731 add typings autogen command 2019-04-01 11:47:49 +08:00