@anticore-contracts/tree-view

1.0.5 • Public • Published

@anticore-contracts/tree-view

An anticore contract to switch between views.

Install

npm i @anticore-contracts/tree-view

Reminder

The tree contracts should be added lastly, to improve the performances.

Exports

on

import '@anticore-contracts/tree-view/on.js'

when

import '@anticore-contracts/tree-view/when.js'

Lifecycle

  • Matches main
  • Picks the title, meta[name], meta[property], from the root node
  • Replaces the current related elements by the new ones
  • If the match doesn't have a .error, it updates the history on new contents
  • If the url doesn't have a hash, it scrolls to 0, 0
  • It listens the popstate, to restore & trigger the view elements

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @anticore-contracts/tree-view

Weekly Downloads

3

Version

1.0.5

License

MIT

Unpacked Size

4.63 kB

Total Files

8

Last publish

Collaborators

  • lcf.vs