Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Correct querySelector binding by returning null
  • Loading branch information
nojaf committed Nov 25, 2024
commit 6c5dd6a8e9b4c72f45a671f98ab0a431fe06fa17
2 changes: 1 addition & 1 deletion src/DOMAPI/Document.res
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Returns the first element that is a descendant of node that matches selectors.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
*/
@send
external querySelector: (document, string) => element = "querySelector"
external querySelector: (document, string) => Null.t<element> = "querySelector"

/**
Returns all element descendants of node that match selectors.
Expand Down
2 changes: 1 addition & 1 deletion src/DOMAPI/DocumentFragment.res
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Returns the first element that is a descendant of node that matches selectors.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/querySelector)
*/
@send
external querySelector: (T.t, string) => element = "querySelector"
external querySelector: (T.t, string) => Null.t<element> = "querySelector"

/**
Returns all element descendants of node that match selectors.
Expand Down
2 changes: 1 addition & 1 deletion src/DOMAPI/Element.res
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Returns the first element that is a descendant of node that matches selectors.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
*/
@send
external querySelector: (T.t, string) => element = "querySelector"
external querySelector: (T.t, string) => Null.t<element> = "querySelector"

/**
Returns all element descendants of node that match selectors.
Expand Down