aberdeen 1.18.1 → 1.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/src/aberdeen.d.ts +2 -0
  2. package/dist/src/aberdeen.js +21 -7
  3. package/dist/src/aberdeen.js.map +3 -3
  4. package/dist/tests/fakedom.js +20 -3
  5. package/dist/tests/fakedom.js.map +3 -3
  6. package/dist/tests/helpers.js +20 -3
  7. package/dist/tests/helpers.js.map +3 -3
  8. package/dist-docs/Tutorial/index.html +2 -2
  9. package/dist-docs/aberdeen/A/index.html +3 -2
  10. package/dist-docs/aberdeen/CUSTOM_DUMP/index.html +2 -2
  11. package/dist-docs/aberdeen/NO_COPY/index.html +2 -2
  12. package/dist-docs/aberdeen/OPAQUE/index.html +2 -2
  13. package/dist-docs/aberdeen/PromiseProxy/index.html +5 -5
  14. package/dist-docs/aberdeen/clean/index.html +2 -2
  15. package/dist-docs/aberdeen/clone/index.html +2 -2
  16. package/dist-docs/aberdeen/copy/index.html +3 -3
  17. package/dist-docs/aberdeen/count/index.html +2 -2
  18. package/dist-docs/aberdeen/cssVars/index.html +2 -2
  19. package/dist-docs/aberdeen/darkMode/index.html +2 -2
  20. package/dist-docs/aberdeen/default/index.html +3 -2
  21. package/dist-docs/aberdeen/derive/index.html +2 -2
  22. package/dist-docs/aberdeen/disableCreateDestroy/index.html +2 -2
  23. package/dist-docs/aberdeen/dump/index.html +2 -2
  24. package/dist-docs/aberdeen/index.html +2 -2
  25. package/dist-docs/aberdeen/insertCss/index.html +2 -2
  26. package/dist-docs/aberdeen/insertGlobalCss/index.html +2 -2
  27. package/dist-docs/aberdeen/invertString/index.html +2 -2
  28. package/dist-docs/aberdeen/isEmpty/index.html +2 -2
  29. package/dist-docs/aberdeen/map/index.html +4 -4
  30. package/dist-docs/aberdeen/merge/index.html +3 -3
  31. package/dist-docs/aberdeen/mount/index.html +2 -2
  32. package/dist-docs/aberdeen/multiMap/index.html +4 -4
  33. package/dist-docs/aberdeen/onEach/index.html +2 -2
  34. package/dist-docs/aberdeen/partition/index.html +4 -4
  35. package/dist-docs/aberdeen/peek/index.html +5 -5
  36. package/dist-docs/aberdeen/proxy/index.html +2 -2
  37. package/dist-docs/aberdeen/ref/index.html +2 -2
  38. package/dist-docs/aberdeen/runQueue/index.html +2 -2
  39. package/dist-docs/aberdeen/setErrorHandler/index.html +2 -2
  40. package/dist-docs/aberdeen/setSpacingCssVars/index.html +2 -2
  41. package/dist-docs/aberdeen/unmountAll/index.html +2 -2
  42. package/dist-docs/aberdeen/unproxy/index.html +2 -2
  43. package/dist-docs/assets/aberdeen/aberdeen.d.ts +2 -0
  44. package/dist-docs/assets/aberdeen/aberdeen.js +21 -7
  45. package/dist-docs/assets/aberdeen/aberdeen.js.map +3 -3
  46. package/dist-docs/dispatcher/Dispatcher/index.html +4 -4
  47. package/dist-docs/dispatcher/MATCH_FAILED/index.html +2 -2
  48. package/dist-docs/dispatcher/MATCH_REST/index.html +2 -2
  49. package/dist-docs/dispatcher/index.html +2 -2
  50. package/dist-docs/hierarchy.html +1 -1
  51. package/dist-docs/index.html +2 -2
  52. package/dist-docs/media/CHANGELOG.md +6 -0
  53. package/dist-docs/modules.html +1 -1
  54. package/dist-docs/prediction/applyCanon/index.html +2 -2
  55. package/dist-docs/prediction/applyPrediction/index.html +2 -2
  56. package/dist-docs/prediction/index.html +2 -2
  57. package/dist-docs/route/Route/index.html +9 -9
  58. package/dist-docs/route/back/index.html +2 -2
  59. package/dist-docs/route/current/index.html +2 -2
  60. package/dist-docs/route/go/index.html +2 -2
  61. package/dist-docs/route/index.html +2 -2
  62. package/dist-docs/route/interceptLinks/index.html +2 -2
  63. package/dist-docs/route/matchCurrent/index.html +2 -2
  64. package/dist-docs/route/persistScroll/index.html +2 -2
  65. package/dist-docs/route/push/index.html +2 -2
  66. package/dist-docs/route/setLog/index.html +2 -2
  67. package/dist-docs/route/up/index.html +2 -2
  68. package/dist-docs/sitemap.xml +59 -59
  69. package/dist-docs/transitions/grow/index.html +2 -2
  70. package/dist-docs/transitions/index.html +2 -2
  71. package/dist-docs/transitions/shrink/index.html +2 -2
  72. package/package.json +1 -1
  73. package/skill/aberdeen.md +56 -54
  74. package/skill/dispatcher.md +6 -6
  75. package/skill/prediction.md +3 -3
  76. package/skill/route.md +18 -18
  77. package/skill/transitions.md +3 -3
  78. package/src/aberdeen.ts +26 -9
package/skill/route.md CHANGED
@@ -1,4 +1,4 @@
1
- [**Aberdeen v1.18.1**](README.md)
1
+ [**Aberdeen v1.18.2**](README.md)
2
2
 
3
3
  ***
4
4
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  ### Route
12
12
 
13
- Defined in: [route.ts:8](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L8)
13
+ Defined in: [route.ts:8](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L8)
14
14
 
15
15
  The class for the global `route` object.
16
16
 
@@ -20,7 +20,7 @@ The class for the global `route` object.
20
20
 
21
21
  > **depth**: `number`
22
22
 
23
- Defined in: [route.ts:20](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L20)
23
+ Defined in: [route.ts:20](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L20)
24
24
 
25
25
  The navigation depth of the current session. Starts at 1. Writing to this property has no effect.
26
26
 
@@ -28,7 +28,7 @@ The navigation depth of the current session. Starts at 1. Writing to this proper
28
28
 
29
29
  > **hash**: `string`
30
30
 
31
- Defined in: [route.ts:14](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L14)
31
+ Defined in: [route.ts:14](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L14)
32
32
 
33
33
  The hash fragment including the leading `#`, or an empty string. For instance `"#my_section"` or `""`.
34
34
 
@@ -36,7 +36,7 @@ The hash fragment including the leading `#`, or an empty string. For instance `"
36
36
 
37
37
  > **nav**: `NavType`
38
38
 
39
- Defined in: [route.ts:28](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L28)
39
+ Defined in: [route.ts:28](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L28)
40
40
 
41
41
  The navigation action that got us to this page. Writing to this property has no effect.
42
42
  - `"load"`: An initial page load.
@@ -49,7 +49,7 @@ Mostly useful for page transition animations. Writing to this property has no ef
49
49
 
50
50
  > **p**: `string`[]
51
51
 
52
- Defined in: [route.ts:12](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L12)
52
+ Defined in: [route.ts:12](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L12)
53
53
 
54
54
  An convenience array containing path segments, mapping to `path`. For instance `[]` (for `"/"`) or `['users', '123', 'feed']` (for `"/users/123/feed"`).
55
55
 
@@ -57,7 +57,7 @@ An convenience array containing path segments, mapping to `path`. For instance `
57
57
 
58
58
  > **path**: `string`
59
59
 
60
- Defined in: [route.ts:10](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L10)
60
+ Defined in: [route.ts:10](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L10)
61
61
 
62
62
  The current path of the URL as a string. For instance `"/"` or `"/users/123/feed"`. Paths are normalized to always start with a `/` and never end with a `/` (unless it's the root path).
63
63
 
@@ -65,7 +65,7 @@ The current path of the URL as a string. For instance `"/"` or `"/users/123/feed
65
65
 
66
66
  > **search**: `Record`\<`string`, `string`\>
67
67
 
68
- Defined in: [route.ts:16](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L16)
68
+ Defined in: [route.ts:16](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L16)
69
69
 
70
70
  The query string interpreted as search parameters. So `"a=x&b=y"` becomes `{a: "x", b: "y"}`.
71
71
 
@@ -73,7 +73,7 @@ The query string interpreted as search parameters. So `"a=x&b=y"` becomes `{a: "
73
73
 
74
74
  > **state**: `Record`\<`string`, `any`\>
75
75
 
76
- Defined in: [route.ts:18](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L18)
76
+ Defined in: [route.ts:18](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L18)
77
77
 
78
78
  An object to be used for any additional data you want to associate with the current page. Data should be JSON-compatible.
79
79
 
@@ -83,7 +83,7 @@ An object to be used for any additional data you want to associate with the curr
83
83
 
84
84
  > `const` **current**: [`Route`](#route)
85
85
 
86
- Defined in: [route.ts:312](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L312)
86
+ Defined in: [route.ts:312](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L312)
87
87
 
88
88
  The global [Route](#route) object reflecting the current URL and browser history state. Changes you make to this affect the current browser history item (modifying the URL if needed).
89
89
 
@@ -93,7 +93,7 @@ The global [Route](#route) object reflecting the current URL and browser history
93
93
 
94
94
  > **back**(`target`): `void`
95
95
 
96
- Defined in: [route.ts:246](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L246)
96
+ Defined in: [route.ts:246](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L246)
97
97
 
98
98
  Try to go back in history to the first entry that matches the given target. If none is found, the given state will replace the current page. This is useful for "cancel" or "close" actions that should return to the previous page if possible, but create a new page if not (for instance when arriving at the current page through a direct link).
99
99
 
@@ -117,7 +117,7 @@ The target route to go back to. May be a subset of [Route](#route), or a string
117
117
 
118
118
  > **go**(`target`, `nav`): `void`
119
119
 
120
- Defined in: [route.ts:170](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L170)
120
+ Defined in: [route.ts:170](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L170)
121
121
 
122
122
  Navigate to a new URL by pushing a new history entry.
123
123
 
@@ -158,7 +158,7 @@ route.go({p: ["users", 123], search: {tab: "feed"}, hash: "top"});
158
158
 
159
159
  > **interceptLinks**(): `void`
160
160
 
161
- Defined in: [route.ts:432](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L432)
161
+ Defined in: [route.ts:432](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L432)
162
162
 
163
163
  Intercept clicks and Enter key presses on links (`<a>` tags) and use Aberdeen routing
164
164
  instead of browser navigation for local paths (paths without a protocol or host).
@@ -186,7 +186,7 @@ A('a text=About href=/corporate/about');
186
186
 
187
187
  > **matchCurrent**(`target`): `boolean`
188
188
 
189
- Defined in: [route.ts:205](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L205)
189
+ Defined in: [route.ts:205](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L205)
190
190
 
191
191
  Returns `true` if the current route matches `target`.
192
192
 
@@ -224,7 +224,7 @@ route.matchCurrent({path: '/users', search: {tab: 'profile'}});
224
224
 
225
225
  > **persistScroll**(`name`): `void`
226
226
 
227
- Defined in: [route.ts:398](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L398)
227
+ Defined in: [route.ts:398](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L398)
228
228
 
229
229
  Restore and store the vertical and horizontal scroll position for
230
230
  the parent element to the page state.
@@ -250,7 +250,7 @@ The scroll position will be persisted in `route.aux.scroll.<name>`.
250
250
 
251
251
  > **push**(`target`, `nav?`): `void`
252
252
 
253
- Defined in: [route.ts:233](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L233)
253
+ Defined in: [route.ts:233](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L233)
254
254
 
255
255
  Modify the current route by merging `target` into it (using [A.merge](aberdeen.md#merge)), pushing a new history entry.
256
256
 
@@ -281,7 +281,7 @@ The navigation type to use. Defaults to `undefined`, meaning the navigation type
281
281
 
282
282
  > **setLog**(`value`): `void`
283
283
 
284
- Defined in: [route.ts:37](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L37)
284
+ Defined in: [route.ts:37](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L37)
285
285
 
286
286
  Configure logging on route changes.
287
287
 
@@ -303,7 +303,7 @@ Configure logging on route changes.
303
303
 
304
304
  > **up**(`stripCount`): `void`
305
305
 
306
- Defined in: [route.ts:272](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/route.ts#L272)
306
+ Defined in: [route.ts:272](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/route.ts#L272)
307
307
 
308
308
  Navigate up in the path hierarchy, by going back to the first history entry
309
309
  that has a shorter path than the current one. If there's none, we just shorten
@@ -1,4 +1,4 @@
1
- [**Aberdeen v1.18.1**](README.md)
1
+ [**Aberdeen v1.18.2**](README.md)
2
2
 
3
3
  ***
4
4
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  > **grow**(`el`): `Promise`\<`void`\>
14
14
 
15
- Defined in: [transitions.ts:33](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/transitions.ts#L33)
15
+ Defined in: [transitions.ts:33](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/transitions.ts#L33)
16
16
 
17
17
  Do a grow transition for the given element. This is meant to be used as a
18
18
  handler for the `create` property.
@@ -38,7 +38,7 @@ for other specific cases as well.
38
38
 
39
39
  > **shrink**(`el`): `Promise`\<`void`\>
40
40
 
41
- Defined in: [transitions.ts:56](https://github.com/vanviegen/aberdeen/blob/55a4fa0c4453a12cdb744d6fa13f1a739c06c0a0/src/transitions.ts#L56)
41
+ Defined in: [transitions.ts:56](https://github.com/vanviegen/aberdeen/blob/ae96ee5d2bf101de8d04c7efc61a03e8fe8fe6f7/src/transitions.ts#L56)
42
42
 
43
43
  Do a shrink transition for the given element, and remove it from the DOM
44
44
  afterwards. This is meant to be used as a handler for the `destroy` property.
package/src/aberdeen.ts CHANGED
@@ -31,7 +31,7 @@ let survivingEl: Element | undefined;
31
31
  // scope's own element, so whether they need undoing can be decided once per scope (see `delete`).
32
32
  const enum SideEffect {
33
33
  Class = 0, // key: class name value: whether the class was present before (boolean)
34
- Style = 1, // key: camelCase style prop value: previous style value (string)
34
+ Style = 1, // key: camelCase style prop or `--custom-prop` value: previous style value (string)
35
35
  Prop = 2, // key: DOM property name value: previous property value
36
36
  Attr = 3, // key: attribute name value: previous attribute value (string | null)
37
37
  Event = 4, // key: event name value: the listener function to remove
@@ -48,7 +48,10 @@ function undoSideEffects(el: any, se: any[]) {
48
48
  const value = se[i + 2];
49
49
  switch (se[i] as SideEffect) {
50
50
  case SideEffect.Class: value ? el.classList.add(key) : el.classList.remove(key); break;
51
- case SideEffect.Style: el.style[key] = value == null ? "" : value; break;
51
+ case SideEffect.Style:
52
+ if (key[0] === "-" && key[1] === "-") value ? el.style.setProperty(key, value) : el.style.removeProperty(key);
53
+ else el.style[key] = value == null ? "" : value;
54
+ break;
52
55
  case SideEffect.Prop: el[key] = value; break;
53
56
  case SideEffect.Attr: value == null ? el.removeAttribute(key) : el.setAttribute(key, value); break;
54
57
  case SideEffect.Event: el.removeEventListener(key, value); break;
@@ -2004,13 +2007,14 @@ export function setSpacingCssVars(base = 1, unit = 'rem'): void {
2004
2007
  }
2005
2008
 
2006
2009
  // Matches: (1) url() content, (2) quoted content, (3) $varName at start or after space
2007
- const CSS_VAR_PATTERN = /(\burl\([^)]*\))|("[^"]*")|(^| )\$([\w-]+)/g;
2010
+ const CSS_VAR_PATTERN = /(\burl\([^)]*\))|("[^"]*")|(^|[\s(,])\$([\w-]+)/g;
2008
2011
  const DIGIT_FIRST = /^\d/;
2009
2012
 
2010
2013
  /**
2011
2014
  * Expands all `$varName` patterns in a CSS value to `var(--varName)`.
2012
- * Only matches `$` at the start of the value or after a space.
2013
- * Content inside parentheses or quotes is preserved as-is.
2015
+ * Only matches `$` at the start of the value or after a space, `(` or `,`
2016
+ * (so e.g. `linear-gradient($a, $b)` expands as expected).
2017
+ * Content inside `url(...)` or quotes is preserved as-is.
2014
2018
  * Numeric names get an 'm' prefix (e.g., `$3` → `var(--m3)`).
2015
2019
  * Variable names may include dashes (e.g., `$primary-color` → `var(--primary-color)`).
2016
2020
  */
@@ -2351,6 +2355,8 @@ export function disableCreateDestroy() {
2351
2355
  * | `r` | `border-radius` |
2352
2356
  *
2353
2357
  * Also, when the value is a string starting with `$`, it is treated as a reference to a CSS variable, expanding to `var(--variableName)`. For numeric variable names (which can't be used directly as CSS custom property names), Aberdeen prefixes them with `m`, so `$3` expands to `var(--m3)`. This is primarily intended for use with {@link setSpacingCssVars}, which initializes spacing variables named `0` through `12` with an exponential spacing scale.
2358
+ *
2359
+ * To *set* a CSS custom property inline on an element, use a `--name` or (symmetrically with the `$`-reference syntax above) a `$name` key. For example `A('div --primary:red')` and `A('div $primary:red')` both set `--primary` to `red`.
2354
2360
  *
2355
2361
  * @returns The most inner DOM element that was created (not counting text nodes nor elements created by content functions), or the current element if no new element was created. You should normally not need to use the return value - use this function's DOM manipulation abilities instead. One valid use case is when integrating with non-Aberdeen code that requires a reference to a DOM element.
2356
2362
  *
@@ -2816,16 +2822,27 @@ function applyArg(el: Element, key: string, value: any) {
2816
2822
  } else if (key[0] === "$") {
2817
2823
  // Style (with shortcuts)
2818
2824
  key = key.substring(1);
2825
+ // A leading `$` denotes a custom property, for symmetry with `$var` value references
2826
+ // (e.g. `$$primary: red` sets `--primary`). `--primary` works too.
2827
+ if (key[0] === "$") key = "--" + key.substring(1);
2819
2828
  const val = value == null || value === false ? "" : typeof value === 'string' ? cssVarRef(value) : String(value);
2820
2829
  const expanded = CSS_SHORT[key] || key;
2821
2830
  const style = (el as any).style;
2822
2831
  const setOwn = el === currentScope.el;
2823
2832
  const props = typeof expanded === "string" ? [expanded] : expanded;
2824
2833
  for (const prop of props) {
2825
- const cm = toCamel(prop);
2826
- // Record the style property's pre-scope value so it can be restored when the scope is cleaned.
2827
- if (setOwn) recordSideEffect(currentScope, SideEffect.Style, cm, style[cm]);
2828
- style[cm] = val;
2834
+ if (prop[0] === "-" && prop[1] === "-") {
2835
+ // Custom property: must go through setProperty/removeProperty, as bracket
2836
+ // assignment of `--*` names is a no-op on a real CSSStyleDeclaration.
2837
+ if (setOwn) recordSideEffect(currentScope, SideEffect.Style, prop, style.getPropertyValue(prop));
2838
+ if (val === "") style.removeProperty(prop);
2839
+ else style.setProperty(prop, val);
2840
+ } else {
2841
+ const cm = toCamel(prop);
2842
+ // Record the style property's pre-scope value so it can be restored when the scope is cleaned.
2843
+ if (setOwn) recordSideEffect(currentScope, SideEffect.Style, cm, style[cm]);
2844
+ style[cm] = val;
2845
+ }
2829
2846
  }
2830
2847
  } else if (value == null) {
2831
2848
  // Value left empty