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

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

example/example.dart

import 'package:domino/browser.dart';
import 'package:web/web.dart';

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

class _App {
  int _counter = 0;

  void build(DomBuilder<Element, Event> b) {
    b.open(
      'button',
      id: 'app-button',
      events: {
        'click': (e) {
          _counter++;
          e.view.invalidate();
        },
      },
    );
    b.text('Click');
    b.close();

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

Publisher

verified publisheragilord.com

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

Repository (GitHub)
View/report issues

Topics

#dom #html #virtual-dom #javascript #incremental-dom

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

web

More

Packages that depend on domino