dom_tools 1.3.11

Dart js
Flutter web

DOM rich elements and tools for CSS, JavaScript, Element Tracking, DOM Manipulation, Storage, Dialog and more.

dom_tools #

pub package CI GitHub Tag New Commits Last Commits Pull Requests Code size License Funding Funding

DOM rich elements and tools for CSS, JavaScript, Element Tracking, DOM Manipulation, Storage, Dialog and more.

Usage #

A simple usage example:

import 'dart:html';
import 'package:dom_tools/dom_tools.dart';

void main() {

  var imgSrc = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png' ;

  // Example of an image that only loads when visualized in viewport:

  var tracker = TrackElementInViewport() ;
  var imageElement = ImageElement() ;

  tracker.track(imageElement, onEnterViewport: (elem) {
    imageElement.src = imgSrc ;
  });

  document.body.children.add( imageElement ) ;

  Future.delayed( Duration(seconds: 10) , (){
    var img = getElementBySRC('img', imgSrc) ;
    if (img == null) {
      window.alert('After 10s the image is not visible in viewport yet') ;
    }
    else {
      window.alert('After 10s the image was visible in viewport.') ;
    }
  });
  
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Author #

Graciliano M. Passos: gmpassos@GitHub.

License #

Dart free & open-source license.

1
likes
100
pub points
62%
popularity

DOM rich elements and tools for CSS, JavaScript, Element Tracking, DOM Manipulation, Storage, Dialog and more.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

gracilianomp@gmail.com

License

BSD (LICENSE)

Dependencies

enum_to_string, html_unescape, intl, json_object_mapper, markdown, swiss_knife

More

Packages that depend on dom_tools