widgetEventCoords :: MonadWidget t m => El t -> m (Event t (Maybe (Double,Double)))
widgetEventCoords el = do
  let moveFunc (x,y) = do
        Just cr <- getBoundingClientRect (_element_raw el)
        t <- realToFrac <$> (getTop cr  :: IO Float)
        l <- realToFrac <$> (getLeft cr :: IO Float)
        return $ Just (fromIntegral  x - l, fromIntegral y - t)
  performEvent $ fmap (liftIO . moveFunc) (domEvent Mousemove el)
widgetEventCoords :: MonadWidget t m => El t -> m (Event t (Maybe (Double,Double)))
widgetEventCoords el = do
  let moveFunc (x,y) = do
        Just cr <- getBoundingClientRect (_element_raw el)
        t <- realToFrac <$> (getTop cr  :: IO Float)
        l <- realToFrac <$> (getLeft cr :: IO Float)
        return $ Just (fromIntegral  x - l, fromIntegral y - t)
  performEvent $ fmap (liftIO . moveFunc) (domEvent Mousemove el)
widgetEventCoords el = do
  let moveFunc (x,y) = do
        Just cr <- getBoundingClientRect (_element_raw el)
        t <- realToFrac <$> (getTop cr  :: IO Float)
        l <- realToFrac <$> (getLeft cr :: IO Float)
        return $ Just (fromIntegral  x - l, fromIntegral y - t)
  performEvent $ fmap (liftIO . moveFunc) (domEvent Mousemove el)