custom_universal_html 2.0.0 copy "custom_universal_html: ^2.0.0" to clipboard
custom_universal_html: ^2.0.0 copied to clipboard

A 'dart:html' that works in all platforms, including Flutter and server-side. Eases cross-platform development and HTML / XML processing.

example/example.dart

import 'package:custom_universal_html/html.dart';

void main() {
  // Create a DOM tree
  final divElement = DivElement();
  divElement.append(Element.tag('h1')
    ..classes.add('greeting')
    ..appendText('Hello world!'));

  // Print outer HTML
  print(divElement.outerHtml);
  // --> <div><h1>Hello world</h1></div>

  // Do a CSS query
  print(divElement.querySelector('div > .greeting')!.text);
  // --> Hello world
}
2
likes
60
pub points
32%
popularity

Publisher

unverified uploader

A 'dart:html' that works in all platforms, including Flutter and server-side. Eases cross-platform development and HTML / XML processing.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

async, charcode, collection, csslib, html, meta, source_span, typed_data, universal_io

More

Packages that depend on custom_universal_html