A library of commonly used JavaScript tools and helpers by Becklyn
BSD-3-CLAUSE License
Bot releases are hidden (Show)
Promise
polyfill to also support Promise.finally
Promise
polyfill to also support Promise.finally
Published by keichinger over 5 years ago
null
to on
and off
.mount
's type definition for functional components to receive additional parameters.on
and off
c7c4b3cisChildElement()
.scrollToElement()
.request()
. Also several type guard helper functions were added, to more easily handle failed requests.parseElementAsJson()
that automatically parses JSON from the content of a node and removes HTML escaping.getScrollParent()
, that fetches a scrollable parent of an element.onNextAnimationFrame()
.onNextAnimationFrame()
(#210) 75c242agetScrollParent()
(#209) 966172bhasOwnProperty()
.hydrate
option when mounting JSX components. It decides whether
hydrate: false/undefined
-> the body is parsed as JSON (and passed as props) and the mounting node is removedhydrate: true
-> the mounting node is left untouched and preact mounts on this node (if possible). The content is not parsed as JSON.This release has no user-facing changes.
This build is broken, jump directly to 4.0.3+
Fixed built files
This build is broken, jump directly to 4.0.3+
This release has (effectively) no user-faced changes.
Published by apfelbox over 5 years ago
3.1.1 was apparently a broken build, so use this one instead.
mount()
and mountJsx()
were removed and replaced with a new mount()
.getData(element)
and setData(element)
were removed. Use element.dataset
directly instead.getAttr(element)
was removed. Use element.getAttribute()
directly instead.addClass()
and removeClass()
were removed. Use element.classList
directly instead.preact
was bumped to 10.xsafeParseJson()
mount()
and mountLazy()
mountLazy()
f5cca67safeParseJson()
2f58e9esafeParseJson()
e9995a6Published by apfelbox over 5 years ago
β οΈ Broken build, go to 3.1.2
directly.
addClass()
removeClass()
setData()
getData()
hasData()
getAllCustomData()
let input = findOne<HTMLInputElement>(".my-input");
instead of let input = findOne(".my-input") as HTMLInputElement;
request
function that performs fetch
requests and parses a standard response protocolrequest()
finalization (#184) c4a5bbarequest()
function (#183) dcf902dT
returns to a list bad880bPublished by keichinger over 5 years ago
Published by apfelbox over 5 years ago
create*Element()
Published by apfelbox almost 6 years ago
mount
was passing the wrong parameters when it found more than one elementPublished by apfelbox almost 6 years ago
mount*()
now has a new optional parameter, where you can specify in which container this component should be mounted into.Published by apfelbox over 6 years ago
mountJsx*()
if the tag is empty