Skip to content

Missing getClientRects method and other stuff #21

Open
@flip111

Description

@flip111

I want to implement this code here https://stackoverflow.com/a/3028037/1833322

which has the line

const isVisible = elem => !!elem && !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length )

For that i need getClientRects. This method is not available in the documentation

https://pursuit.purescript.org/packages/purescript-web-dom/4.0.1/docs/Web.DOM.Element

I also saw a bunch of other properties, methods and event handlers that don't seem to be implemented

From: https://developer.mozilla.org/en-US/docs/Web/API/Element

properties

Element.computedName
Element.computedRole
Element.innerHTML
Element.outerHTML
Element.part
NonDocumentTypeChildNode.nextElementSibling
NonDocumentTypeChildNode.previousElementSibling
Element.shadowRoot
Element.slot
Element.undoManager
Element.undoScope
Slotable.assignedSlot

event handlers

Element.onfullscreenchange
Element.onfullscreenerror

methods

EventTarget.addEventListener()
Element.attachShadow()
Element.animate()
Element.closest()
Element.createShadowRoot()
Element.computedStyleMap()
EventTarget.dispatchEvent()
Element.getAnimations()
Element.getAttributeNames()
Element.getAttributeNS()
Element.getBoundingClientRect()
Element.getClientRects()
Element.hasAttributeNS()
Element.hasPointerCapture()
Element.insertAdjacentElement()
Element.insertAdjacentHTML()
Element.insertAdjacentText()
Element.matches()
Element.pseudo()
Element.querySelector()
Element.querySelectorAll()
Element.releasePointerCapture()
ChildNode.remove()
Element.removeAttributeNS()
Element.removeAttributeNode()
EventTarget.removeEventListener()
Element.requestFullscreen()
Element.requestPointerLock()
Element.scroll()
Element.scrollBy()
Element.scrollIntoView()
Element.scrollTo()
Element.setAttributeNS()
Element.setPointerCapture()
Element.toggleAttribute()

Metadata

Metadata

Assignees

No one assigned

    Labels

    purs-0.15A reminder to address this issue or merge this PR before we release PureScript v0.15.0type: enhancementA new feature or addition.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions