Commit 5d5e0e3
committed
updateStyle(): use setProperty() only when css vars
This will improve the performance of “mutate styles/properties” and reduce the amount of code a little.
Also, it turns out that the CSSStyleDeclaration interface also supports stuff like elem.style["font-size"] as well as the equivalent elem.style.fontSize.
https://drafts.csswg.org/cssom/#dom-cssstyleproperties-dashed-attribute1 parent 50c580b commit 5d5e0e3
2 files changed
+8
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | 781 | | |
789 | 782 | | |
790 | 783 | | |
| |||
800 | 793 | | |
801 | 794 | | |
802 | 795 | | |
803 | | - | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
804 | 800 | | |
805 | 801 | | |
806 | 802 | | |
807 | 803 | | |
808 | 804 | | |
809 | 805 | | |
810 | 806 | | |
811 | | - | |
| 807 | + | |
| 808 | + | |
812 | 809 | | |
813 | 810 | | |
814 | 811 | | |
815 | 812 | | |
816 | 813 | | |
817 | | - | |
| 814 | + | |
| 815 | + | |
818 | 816 | | |
819 | 817 | | |
820 | 818 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 49 | | |
57 | 50 | | |
58 | 51 | | |
| |||
0 commit comments