Skip to content

Commit

Permalink
run gleam format
Browse files Browse the repository at this point in the history
  • Loading branch information
CrowdHailer committed Mar 6, 2024
1 parent e6c795c commit cab41b3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/plinth/browser/element.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ pub fn value(element: Element) -> Result(String, Nil)
@external(javascript, "../../element_ffi.mjs", "focus")
pub fn focus(element: Element) -> Nil


@external(javascript, "../../element_ffi.mjs", "selectionStart")
pub fn selection_start(element: Element) -> Result(Int, Nil)

@external(javascript, "../../element_ffi.mjs", "setSelectionRange")
pub fn set_selection_range(element: Element,start: Int,end: Int) -> Nil
pub fn set_selection_range(element: Element, start: Int, end: Int) -> Nil
3 changes: 2 additions & 1 deletion src/plinth/browser/range.gleam
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import plinth/browser/element.{type Element}

pub type Range

@external(javascript, "../../range_ffi.mjs", "startContainer")
Expand All @@ -11,4 +12,4 @@ pub fn start_offset(range: Range) -> Element
pub fn end_container(range: Range) -> Element

@external(javascript, "../../range_ffi.mjs", "endOffset")
pub fn end_offset(range: Range) -> Element
pub fn end_offset(range: Range) -> Element
1 change: 1 addition & 0 deletions src/plinth/browser/selection.gleam
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import plinth/browser/range.{type Range}

pub type Selection

@external(javascript, "../../selection_ffi.mjs", "getSelection")
Expand Down
2 changes: 1 addition & 1 deletion src/plinth/browser/window.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ pub type RequestID
pub fn request_animation_frame(callback: fn() -> Nil) -> RequestID

@external(javascript, "../../window_ffi.mjs", "cancelAnimationFrame")
pub fn cancel_animation_frame(request_id: RequestID) -> Nil
pub fn cancel_animation_frame(request_id: RequestID) -> Nil

0 comments on commit cab41b3

Please sign in to comment.