Skip to content

Commit 7851385

Browse files
committed
Corrected return type of getPropertyValue for CSS style attributes (is now nullable)
1 parent 5360544 commit 7851385

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
1212
## main
1313

14+
15+
#### :boom: Breaking Change
16+
17+
- Corrected return type of `getPropertyValue` for CSS style attributes (it's nullable and now returns an option).
18+
1419
# 0.9.1
1520

1621
#### :bug: Bug Fix

src/Webapi/Dom/Webapi__Dom__CssStyleDeclaration.res

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ type cssRule /* TODO: Move to Webapi__Dom */
77
@get external parentRule: t => cssRule = "parentRule"
88

99
@send external getPropertyPriority: (t, string) => string = "getPropertyPriority"
10-
@send external getPropertyValue: (t, string) => string = "getPropertyValue"
10+
@send @return(nullable)
11+
external getPropertyValue: (t, string) => option<string> = "getPropertyValue"
1112
@send external item: (t, int) => string = "item"
1213
@send external removeProperty: (t, string) => string = "removeProperty"
1314
@send external setProperty: (t, string, string, string) => unit = "setProperty"
@@ -135,4 +136,4 @@ type cssRule /* TODO: Move to Webapi__Dom */
135136
@get external widows: t => string = "widows"
136137
@get external width: t => string = "width"
137138
@get external wordSpacing: t => string = "wordSpacing"
138-
@get external zIndex: t => string = "zIndex"
139+
@get external zIndex: t => string = "zIndex"

0 commit comments

Comments
 (0)