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

outdated

Cross-platform 'dart:html'. Works in browser, server-side, 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
}
476
likes
0
pub points
99%
popularity

Publisher

verified publisherdint.dev

Cross-platform 'dart:html'. Works in browser, server-side, 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