@st-lib/render-events
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@st-lib/render @st-lib/events bindings.

import { render, text } from '@st-lib/render'
import { button } from '@st-lib/render-html'
import { onClick } from '@st-lib/render-events'

window.onload = () => {
	render(document.body, () => {
		button(null, () => {
			onClick(() => {
				console.log('click')
			})
			text(null, 'click me?')
		})
	})
}
import { render, text } from '@st-lib/render'
import { onDocumentScroll, onWindowResize } from '@st-lib/render-events'

window.onload = () => {
	render(document.body, () => {
		onDocumentScroll(() => {
			console.log(document.scrollTop)
		}, true)

		onWindowResize(() => {
			console.log(window.innerWidth, window.innerHeight)
		}, true)


		text(null, 'lorem ipsum' /* ... */)
	})
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @st-lib/render-events

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

178 kB

Total Files

6

Last publish

Collaborators

  • st-lib