Skip to content

Provide a way to contribute docs to dart:html #24682

Open
@kasperpeulen

Description

The dart:html library is very short of documentation. I think the least I can ask is a way to help making it better :)

I think it would be much easier, if there was one yaml file, with documentation that gets kind of injected in the generated html library. Something like:

Element.style: |
  /// Returns an object that represents the element's style attribute. See the
  /// [CSS Properties Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Properties_Reference)
  /// for a list of the CSS properties accessible via [style].
  ///
  /// Example usage:
  ///
  ///     var textArea = querySelector('textarea');
  ///     textArea.style.height = 'auto';
  ///
  /// ## Other resources
  ///
  /// * [Element.style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) at MDN.
Element.getBoundingClientRect: |
  /**
   * Returns the smallest bounding rectangle that encompasses this element's
   * padding, scrollbar, and border.
   *
   * ## Other resources
   *
   * * [Element.getBoundingClientRect]
   * (https://developer.mozilla.org/en-US/docs/Web/API/Element.getBoundingClientRect)
   * from MDN.
   * * [The getBoundingClientRect() method]
   * (http://www.w3.org/TR/cssom-view/#the-getclientrects-and-getboundingclientrect-methods)
   * from W3C.
   */

Or maybe even only the text (without the doc syntax). cc @alan-knight

Metadata

Assignees

No one assigned

    Labels

    area-webUse area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.library-htmlweb-librariesIssues impacting dart:html, etc., libraries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions