Skip to content

Commit

Permalink
refine naming; tag 0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Nov 11, 2024
1 parent 7788766 commit f81eeff
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion moon.mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiye/dom-ffi",
"version": "0.0.4",
"version": "0.0.5",
"readme": "README.md",
"repository": "https://github.com/Respo/dom-ffi.mbt",
"homepage": "https://github.com/Respo/dom-ffi.mbt",
Expand Down
20 changes: 10 additions & 10 deletions src/lib/location.mbt
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
/// https://developer.mozilla.org/en-US/docs/Web/API/Location
pub type Location

pub extern "js" fn get_location(self : Window) -> Location =
pub extern "js" fn location(self : Window) -> Location =
#| (self) => self.location

pub extern "js" fn get_href(self : Location) -> String =
pub extern "js" fn href(self : Location) -> String =
#| (self) => self.href

pub extern "js" fn set_href(self : Location, href : String) -> Unit =
#| (self, href) => { self.href = href }

pub extern "js" fn get_protocol(self : Location) -> String =
pub extern "js" fn protocol(self : Location) -> String =
#| (self) => self.protocol

pub extern "js" fn get_host(self : Location) -> String =
pub extern "js" fn host(self : Location) -> String =
#| (self) => self.host

pub extern "js" fn get_hostname(self : Location) -> String =
pub extern "js" fn hostname(self : Location) -> String =
#| (self) => self.hostname

pub extern "js" fn get_port(self : Location) -> String =
pub extern "js" fn port(self : Location) -> String =
#| (self) => self.port

pub extern "js" fn get_pathname(self : Location) -> String =
pub extern "js" fn pathname(self : Location) -> String =
#| (self) => self.pathname

pub extern "js" fn get_search(self : Location) -> String =
pub extern "js" fn search(self : Location) -> String =
#| (self) => self.search

pub extern "js" fn get_hash(self : Location) -> String =
pub extern "js" fn hash(self : Location) -> String =
#| (self) => self.hash

pub extern "js" fn get_origin(self : Location) -> String =
pub extern "js" fn origin(self : Location) -> String =
#| (self) => self.origin

pub extern "js" fn assign(self : Location, url : String) -> Unit =
Expand Down
2 changes: 1 addition & 1 deletion src/lib/params.mbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
pub type URLSearchParams

pub extern "js" fn get_url_search_params(s : String) -> URLSearchParams =
pub extern "js" fn new_url_search_params(s : String) -> URLSearchParams =
#| (s) => new URLSearchParams(s)

pub extern "js" fn has(self : URLSearchParams, name : String) -> Bool =
Expand Down

0 comments on commit f81eeff

Please sign in to comment.