google / incremental-dom

An in-place DOM diffing library
http://google.github.io/incremental-dom/
Apache License 2.0
3.54k stars 180 forks source link

Do not track focus state on NodeData. #370

Closed sparhami closed 6 years ago

sparhami commented 6 years ago

Remove the import of NodeData at the start of the patch for the focus path, making inferred keys work correctly. The cost of checking the focus path array is very small compared to either creating or moving a Node.

Two side benefits are 1: we use less memory per Node and 2: we save a few bytes on the gzipped payload.