universal_html 1.1.19 copy "universal_html: ^1.1.19" to clipboard
universal_html: ^1.1.19 copied to clipboard

outdated

Cross-platform 'dart:html' that works in all platforms (browser, Dart VM, and Flutter).

example/example.dart

import 'package: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
}
432
likes
0
pub points
99%
popularity

Publisher

verified publisherdint.dev

Cross-platform 'dart:html' that works in all platforms (browser, Dart VM, and Flutter).

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

async, charcode, collection, csslib, html, meta, typed_data, universal_io, xml, zone_local

More

Packages that depend on universal_html