Skip to content

Add Style Declaration Property Accessors #1170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# dev (2021-??-??) - ??

## Features/Changes
* Lib: add CSSStyleDeclaration.{setProperty, getPropertyValue, getPropertyPriority, removeProperty}

## Bug fixes
* Compiler: fix sourcemap warning for empty cma

Expand Down
9 changes: 9 additions & 0 deletions lib/js_of_ocaml/dom_html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ external decode_html_entities : js_string t -> js_string t = "caml_js_html_entit

class type cssStyleDeclaration =
object
method setProperty :
js_string t -> js_string t -> js_string t optdef -> js_string t meth

method getPropertyValue : js_string t -> js_string t meth

method getPropertyPriority : js_string t -> js_string t meth

method removeProperty : js_string t -> js_string t meth

method animation : js_string t prop

method animationDelay : js_string t prop
Expand Down
9 changes: 9 additions & 0 deletions lib/js_of_ocaml/dom_html.mli
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ open Js

class type cssStyleDeclaration =
object
method setProperty :
js_string t -> js_string t -> js_string t optdef -> js_string t meth

method getPropertyValue : js_string t -> js_string t meth

method getPropertyPriority : js_string t -> js_string t meth

method removeProperty : js_string t -> js_string t meth

method animation : js_string t prop

method animationDelay : js_string t prop
Expand Down