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

dart:dom IDBObjectStore put should allow for any object to be used as key #1813

Closed
sethladd opened this issue Feb 23, 2012 · 6 comments
Closed
Assignees
Labels
web-libraries Issues impacting dart:html, etc., libraries

Comments

@sethladd
Copy link
Contributor

The put() method is defined at: http://www.w3.org/TR/IndexedDB/#widl-IDBObjectStoreSync-put-any-any-value-any-key

The key is of type "any" (further specified to be an Array, Date, DOMString, float) : http://www.w3.org/TR/IndexedDB/#dfn-valid-key

Our IDBObjectStore.dart in dom/generated/src/frog has this:

_IDBRequestJs put(Dynamic value, [_IDBKeyJs key = null]) native;

And when using code like this:

dom.IDBRequest addRequest = objectStore.put(msg, new Date.now().value);

The editor rightly complains that "int is not assignable to IDBKey"

@rakudrama
Copy link
Member

Removed Area-UI label.
Added Area-DOM label.

@rakudrama
Copy link
Member

Marked this as blocking #1310.

@vsmenon
Copy link
Member

vsmenon commented Jul 11, 2012

Added this to the Later milestone.

@iposva-google
Copy link
Contributor

Removed Area-DOM label.
Added Area-HTML label.

@rakudrama
Copy link
Member

The interface

  IDBRequest put(/SerializedScriptValue/ value, [/IDBKey/ key]);

and implementation

  _IDBRequestImpl put(value, [key = _default]) {

are now generated with type Dynamic.

@rakudrama
Copy link
Member

Added Fixed label.

@sethladd sethladd added Type-Defect web-libraries Issues impacting dart:html, etc., libraries labels Oct 4, 2012
@sethladd sethladd added this to the Later milestone Oct 4, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-libraries Issues impacting dart:html, etc., libraries
Projects
None yet
Development

No branches or pull requests

4 participants