fletch 0.1.0
fletch: ^0.1.0 copied to clipboard
A jQuery-like library implemented using common Dart patterns.
Fletch
#
jQuery for Dart #
Fletch is a Dart library aiming to provide similar functionality to jQuery. However, Fletch is not designed to be API-compatible with jQuery, instead preferring to take advantage of Dart features and design patterns.
For example, here is a snippet of jQuery:
$("<a>").text("Dart is cool!")
.attr("href", "https://www.dartlang.org/")
.style("font-weight", "bold")
.appendTo("body");
Here is the equivalent code in Fletch:
$("<a>")..text = "Dart is cool!"
..attr["href"] = "https://www.dartlang.org/"
..style["font-weight"] = "bold"
..appendTo("body");
Fletch is very much a work in progress. So far, you can select/create elements, get/set text, get/set styles, add/remove classes, get/set attributes, and listen to/trigger events. Fletch should be considered alpha quality, as the public-facing API may change radically between releases.
Fletch is released under the ISC License, which is functionally equivalent
to the BSD-2 and MIT licenses. See the LICENSE file for more information.