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

outdated

Supports a subset of 'dart:html' in all platforms (browser, VM, and Flutter).

example/universal_html.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

Supports a subset of 'dart:html' in all platforms (browser, VM, and Flutter).

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

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

More

Packages that depend on universal_html