Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document dart:html Storage interface to demonstrate usage #3091

Closed
sethladd opened this issue May 16, 2012 · 8 comments
Closed

Document dart:html Storage interface to demonstrate usage #3091

sethladd opened this issue May 16, 2012 · 8 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Milestone

Comments

@sethladd
Copy link
Contributor

http://api.dartlang.org/html/Storage.html

The Storage interface should have non-$dom methods for

interface Storage {
  readonly attribute unsigned long length;
  [IndexGetter] DOMString key(in unsigned long index);
  [NameGetter] DOMString getItem(in DOMString key);
  [NameSetter] void setItem(in DOMString key, in DOMString data);
  [NameDeleter] void removeItem(in DOMString key);
  void clear();
};

@vsmenon
Copy link
Member

vsmenon commented May 16, 2012

If you look at the fine print, you'll see that it extends the Dart Map type instead. See sample usage here:

http://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/tests/html/localstorage_test.dart

@sethladd
Copy link
Contributor Author

Touche' ! :)

OK, how about putting a class level doc at the top of the method? This class level doc would show an example of usage, or at a minimal say "This interface extends Map, thus you can access local storage and session storage keys and values just like a Map."

Is this interface auto-generated? Or is it something I can submit a patch for?

@vsmenon
Copy link
Member

vsmenon commented May 16, 2012

It is auto-generated ... but it'd be great to support a workflow that let you edit class and method level docs without having to muck with scripts and templates.

We do some post-processing in apidoc to link to MDN. Should we do something similar to inline docs?

@sethladd
Copy link
Contributor Author

I am very happy to write the doc copy if there's a way to jam it in. If you think apidoc is the right way to do that, I can poke around if I have time soon.

In this case, there's another issue with Storage and MDN docs: issue #3090 (wrong MDN docs)

@vsmenon
Copy link
Member

vsmenon commented May 17, 2012

I'm repurposing this to add documentation for this class once we fix 3103 (on blocking list).


Set owner to @sethladd.
Marked this as being blocked by #3103.
Changed the title to: "Document dart:html Storage interface to demonstrate usage".

@sethladd
Copy link
Contributor Author

Hi Alex, please add some very basic docs, and remove the MDN boilerplate, from this interface, before IO. Thanks!


Set owner to [email protected].
Added this to the IO2012 milestone.

@kwalrath
Copy link
Contributor

CL:
https://chromiumcodereview.appspot.com/10684008/

Docs staged at:
http://kathy-02.dartlang-api.appspot.com/html/Storage.html


Set owner to @kwalrath.
Added Started label.
Marked this as being blocked by #3103.
Unmarked this as being blocked by #3103.

@kwalrath
Copy link
Contributor

http://api.dartlang.org/html/Storage.html now has a summary and links to more info.


Added Fixed label.

@sethladd sethladd added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures labels Jun 27, 2012
@sethladd sethladd added this to the IO2012 milestone Jun 27, 2012
dart-bot pushed a commit that referenced this issue Sep 13, 2021
New commits in this version:

git -C third_party/pkg/pub log --oneline cd7a43f2109f7e5eb22e73c7f4e15d25fd57598e..d95c5713dda518ed53ada70e00789e6aadbfbe48
d95c5713 (HEAD, origin/master, origin/HEAD) Remove duplicate global invocation on Windows (#3055)
4c5198df master->main (#3101)
e793fd52 More tool/test.dart tweaks (#3097)
1b228edd Report retracted packages (#3093)
4fedb6c5 Tweak strict dependencies error message for `_validateBenchmarkTestTool` (#3087)
e608ab6e Improve test script (#3091)
abf702c4 Detect potential leaks in `dart pub publish`. (#3049)
9941c1f9 Fix broken simplification of prerelease constraints (#3078)
f0cdfa27 format (#3086)
5a1242c6 Fix unicode terminal detection windows (#2933)
58e2296d Dart format (#3084)
1426601c use incremental compilation in the tool/test.dart script (#3075)
9954f851 Fix a typo (#3062)
44489b31 Use relative import for path.dart (#2959)
77702ab1 Always precompile scripts before running them (#3074)

Change-Id: I913ab9e3b5bc7181d483a2de96ec4ad917028b75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213262
Reviewed-by: Jonas Jensen <[email protected]>
Commit-Queue: Sigurd Meldgaard <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

3 participants