incremental_dom_bindings 2.1.0+1 copy "incremental_dom_bindings: ^2.1.0+1" to clipboard
incremental_dom_bindings: ^2.1.0+1 copied to clipboard

Platformweb

Dart bindings for the Incremental DOM library. That's a JS library for updating DOM trees (real DOM, not virtual DOM).

example/main.dart

import 'dart:html';

import 'package:incremental_dom_bindings/incremental_dom_bindings.dart';

void main() {
  // query the element to patch
  final root = querySelector('#root')!;

  // patch the element
  patch(root, (_) {
    // open a div element with the attributes id and style
    elementOpen('div', null, [
      'id',
      'testId',
      'style',
      {'color': 'red'}
    ]);

    // add a text inside the div element
    text('Hello World');

    // close the div element
    elementClose('div');
  });
}
1
likes
145
pub points
0%
popularity

Publisher

verified publisherblimster.net

Dart bindings for the Incremental DOM library. That's a JS library for updating DOM trees (real DOM, not virtual DOM).

Repository

Documentation

API reference

License

MIT (license)

More

Packages that depend on incremental_dom_bindings