angular-docs-cn/packages/core/test/bundling/todo
Miško Hevery 9bd9590767 refactor(ivy): change styling to use programmatic API on updates (#34804)
Previously we would write to class/style as strings `element.className` and `element.style.cssText`. Turns out that approach is good for initial render but not good for updates. Updates using this approach are problematic because we have to check to see if there was an out of bound write to style and than perform reconciliation. This also requires the browser to bring up CSS parser which is expensive.

Another problem with old approach is that we had to queue the DOM writes and flush them twice. Once on element advance instruction and once in `hostBindings`. The double flushing is expensive but it also means that a directive can observe that styles are not yet written (they are written after directive executes.)

The new approach uses `element.classList.add/remove` and `element.style.setProperty/removeProperty` API for updates only (it continues to use `element.className` and `element.style.cssText` for initial render as it is cheaper.) The other change is that the styling changes are applied immediately (no queueing). This means that it is the instruction which computes priority. In some circumstances it may result in intermediate writes which are than overwritten with new value. (This should be rare)

Overall this change deletes most of the previous code and replaces it with new simplified implement. The simplification results in code savings.

PR Close #34804
2020-01-24 12:23:19 -08:00
..
BUILD.bazel build: set default ts_devserver serving_path to /app_bundle.js to match g3 (#33996) 2019-11-26 16:09:32 -08:00
OUTSTANDING_WORK.md test(ivy): update todo app to http://todomvc.com (#23168) 2018-04-10 13:14:20 -07:00
base.css test(ivy): update todo app to http://todomvc.com (#23168) 2018-04-10 13:14:20 -07:00
bundle.golden_symbols.json refactor(ivy): change styling to use programmatic API on updates (#34804) 2020-01-24 12:23:19 -08:00
index.html test: fix ivy ts_devserver tests under /packages/core/test/bunding/ (#32520) 2019-09-06 20:03:40 -04:00
index.ts feat(ivy): type checking of event bindings (#33125) 2019-10-18 14:41:53 -04:00
todo.css refactor: remove obsolete font-smoothing property (#28174) 2019-01-23 15:44:35 -08:00
todo_e2e_spec.ts test(ivy): add bundling test `todo_i18n` (#27420) 2018-12-04 19:59:12 -08:00