domino 0.8.2 copy "domino: ^0.8.2" to clipboard
domino: ^0.8.2 copied to clipboard

outdated

An incremental DOM library, with support for virtual DOM and components.

Domino #

Inspired by Google's incremental-dom library, package:domino is a Dart-native DOM library supporting incremental DOM updates, efficient event handling and reuse.

NOTE: early version of the package did use virtual DOM, which is a use-case that can be supported via incremental DOM too.

Usage #

A simple usage example:

import 'dart:html';

import 'package:domino/domino.dart';
import 'package:domino/domino_browser.dart';

void main() {
  registerView(root: document.getElementById('root')!, builderFn: _app);
}

int _counter = 0;

void _app(DomBuilder b) {
  b.open(
    'button',
    id: 'app-button',
    events: {
      'click': (e) {
        _counter++;
        e.view.invalidate();
      },
    },
  );
  b.text('click');
  b.close();

  b.open('span', id: 'app-count');
  b.text('Counter: $_counter');
  b.close();
}
6
likes
0
pub points
51%
popularity

Publisher

verified publisheragilord.com

An incremental DOM library, with support for virtual DOM and components.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on domino