club3

1.0.7 • Public • Published

Table of Contents

Component

Component

register

Parameters

  • name string must be a unique dash separate string.
  • Self Class component life cycle class. (optional, default Component)

Examples

c3.register('app-root', class extends c3.Component {
  attached() {
    console.log(this.name, 'attached to', this.host.parentNode)
  }
})

VComment

Extends VNode

Create a new virtual comment.

VNode

diff

Create a Vpatch with all differences between given node

Parameters

  • next VNode node to diff aganst.
  • patch VPatch VPatch to add changes to. (optional, default new VPatch())

Returns any VPatch

applyPatch

Apply all changes to given DOM Element

Parameters

Examples

const parser = new HTMLParser()
const patch = new VDocument().diff(parser.parseHTML(`
  <div onclick="this.clickHandler(event)"></div>
`))
 
patch.applyPatch(document.body, {
  clickHandler(event) {
    // ...handle event
  }
})

/club3/

    Package Sidebar

    Install

    npm i club3

    Weekly Downloads

    0

    Version

    1.0.7

    License

    ISC

    Unpacked Size

    53.6 kB

    Total Files

    23

    Last publish

    Collaborators

    • johano