This repository was archived by the owner on Oct 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,12 @@ exports.setSpellcheck = function (spellcheck) {
202202
203203// - CSSOM ---------------------------------------------------------------------
204204
205+ exports . getBoundingClientRect = function ( el ) {
206+ return function ( ) {
207+ return el . getBoundingClientRect ( ) ;
208+ } ;
209+ } ;
210+
205211exports . offsetParent = function ( el ) {
206212 return function ( ) {
207213 return el . offsetParent ;
Original file line number Diff line number Diff line change @@ -39,6 +39,19 @@ foreign import click :: forall eff. HTMLElement -> Eff (dom :: DOM | eff) Unit
3939foreign import focus :: forall eff . HTMLElement -> Eff (dom :: DOM | eff ) Unit
4040foreign import blur :: forall eff . HTMLElement -> Eff (dom :: DOM | eff ) Unit
4141
42+ foreign import getBoundingClientRect
43+ :: forall eff
44+ . HTMLElement
45+ -> Eff
46+ (dom :: DOM | eff )
47+ { left :: Number
48+ , top :: Number
49+ , right :: Number
50+ , bottom :: Number
51+ , width :: Number
52+ , height :: Number
53+ }
54+
4255foreign import offsetParent :: forall eff . HTMLElement -> Eff (dom :: DOM | eff ) (Nullable Element )
4356foreign import offsetTop :: forall eff . HTMLElement -> Eff (dom :: DOM | eff ) Number
4457foreign import offsetLeft :: forall eff . HTMLElement -> Eff (dom :: DOM | eff ) Number
You can’t perform that action at this time.
0 commit comments