Skip to content

Commit 3e40224

Browse files
committed
I did an oopsie
Swap function argument order so that it coincides with FFI functions.
1 parent c557720 commit 3e40224

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Web/DOM/Element.purs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,20 @@ type ScrollToOptions_ =
147147
, behavior :: String
148148
}
149149

150-
foreign import _scroll :: Element -> ScrollToOptions_ -> Effect Unit
150+
foreign import _scroll :: ScrollToOptions_ -> Element -> Effect Unit
151151

152-
scroll :: Element -> ScrollToOptions -> Effect Unit
153-
scroll elem opts = _scroll elem (opts { behavior = stringScrollBehavior opts.behavior })
152+
scroll :: ScrollToOptions -> Element -> Effect Unit
153+
scroll opts = _scroll (opts { behavior = stringScrollBehavior opts.behavior })
154154

155-
foreign import _scrollTo :: Element -> ScrollToOptions_ -> Effect Unit
155+
foreign import _scrollTo :: ScrollToOptions_ -> Element -> Effect Unit
156156

157-
scrollTo :: Element -> ScrollToOptions -> Effect Unit
158-
scrollTo elem opts = _scrollTo elem (opts { behavior = stringScrollBehavior opts.behavior })
157+
scrollTo :: ScrollToOptions -> Element -> Effect Unit
158+
scrollTo opts = _scrollTo (opts { behavior = stringScrollBehavior opts.behavior })
159159

160-
foreign import _scrollBy :: Element -> ScrollToOptions_ -> Effect Unit
160+
foreign import _scrollBy :: ScrollToOptions_ -> Element -> Effect Unit
161161

162-
scrollBy :: Element -> ScrollToOptions -> Effect Unit
163-
scrollBy elem opts = _scrollBy elem (opts { behavior = stringScrollBehavior opts.behavior })
162+
scrollBy :: ScrollToOptions -> Element -> Effect Unit
163+
scrollBy opts = _scrollBy (opts { behavior = stringScrollBehavior opts.behavior })
164164

165165
data ScrollAlignment = Start | Center | End | Nearest
166166

@@ -182,10 +182,10 @@ type ScrollIntoViewOptions_ =
182182
, inline :: String
183183
}
184184

185-
foreign import _scrollIntoView :: Element -> ScrollIntoViewOptions_ -> Effect Unit
185+
foreign import _scrollIntoView :: ScrollIntoViewOptions_ -> Element -> Effect Unit
186186

187-
scrollIntoView :: Element -> ScrollIntoViewOptions -> Effect Unit
188-
scrollIntoView elem _opts = _scrollIntoView elem opts
187+
scrollIntoView :: ScrollIntoViewOptions -> Element -> Effect Unit
188+
scrollIntoView _opts = _scrollIntoView opts
189189
where
190190
opts = { behavior: stringScrollBehavior _opts.behavior
191191
, block: stringScrollAlignment _opts.block

0 commit comments

Comments
 (0)