Sha256: 9bdd480db82ee3eddd5966ded3ecb5429958e30012fe3fc9de2e8b273124333a
Contents?: true
Size: 905 Bytes
Versions: 2
Compression:
Stored size: 905 Bytes
Contents
class FuturismTableRow extends HTMLTableRowElement { connectedCallback () { const options = {} this.observer = new IntersectionObserver((entries, observer) => { entries.forEach( (entry => { if (entry.isIntersecting) { this.dispatchAppearEvent(entry, observer) } }).bind(this) ) }, options) this.observer.observe(this) } dispatchAppearEvent (entry, observer) { if (window.Futurism) { const evt = new CustomEvent('futurism:appear', { bubbles: true, detail: { target: entry.target, observer } }) this.dispatchEvent(evt) } else { setTimeout( (() => { this.dispatchAppearEvent(entry, observer) }).bind(this), 1 ) } } } customElements.define('futurism-table-row', FuturismTableRow, { extends: 'tr' })
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
futurism-0.1.1 | lib/templates/elements/futurism_table_row.js |
futurism-0.1.0 | lib/templates/elements/futurism_table_row.js |