diff --git a/src/DOMAPI/Document.res b/src/DOMAPI/Document.res index 1a496dbf..c74ae5f6 100644 --- a/src/DOMAPI/Document.res +++ b/src/DOMAPI/Document.res @@ -15,7 +15,7 @@ Returns the first element within node's descendants whose ID is elementId. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getElementById) */ @send -external getElementById: (document, string) => element = "getElementById" +external getElementById: (document, string) => null = "getElementById" /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getAnimations) @@ -442,7 +442,7 @@ Returns an object representing the current selection of the document that is loa [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/getSelection) */ @send -external getSelection: document => selection = "getSelection" +external getSelection: document => null = "getSelection" /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/hasStorageAccess) diff --git a/src/DOMAPI/DocumentFragment.res b/src/DOMAPI/DocumentFragment.res index 203903ff..7862a98d 100644 --- a/src/DOMAPI/DocumentFragment.res +++ b/src/DOMAPI/DocumentFragment.res @@ -38,7 +38,7 @@ Returns the first element within node's descendants whose ID is elementId. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/getElementById) */ @send - external getElementById: (T.t, string) => element = "getElementById" + external getElementById: (T.t, string) => null = "getElementById" /** Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes. diff --git a/src/DOMAPI/Window.res b/src/DOMAPI/Window.res index 2d163816..f4f8c272 100644 --- a/src/DOMAPI/Window.res +++ b/src/DOMAPI/Window.res @@ -514,4 +514,4 @@ external cancelIdleCallback: (window, int) => unit = "cancelIdleCallback" [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/getSelection) */ @send -external getSelection: window => selection = "getSelection" +external getSelection: window => null = "getSelection" diff --git a/src/Global.res b/src/Global.res index 8405eefd..9ce95455 100644 --- a/src/Global.res +++ b/src/Global.res @@ -744,4 +744,4 @@ external cancelIdleCallback: int => unit = "cancelIdleCallback" /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/getSelection) */ -external getSelection: unit => selection = "getSelection" +external getSelection: unit => null = "getSelection"