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

outdated

A 'dart:html' that works in all platforms, including Flutter and servers. Eases cross-platform development, web scraping, and other HTML / XML handling.

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

A 'dart:html' that works in all platforms, including Flutter and servers. Eases cross-platform development, web scraping, and other HTML / XML handling.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

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

More

Packages that depend on universal_html