This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11856 - what happens when nothing happens in the getData() algorithm?
Summary: what happens when nothing happens in the getData() algorithm?
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 minor
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 03:35 UTC by Hallvord R. M. Steen
Modified: 2011-08-04 05:03 UTC (History)
5 users (show)

See Also:


Attachments

Description Hallvord R. M. Steen 2011-01-25 03:35:38 UTC
Regarding: http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dom-datatransfer-getdata :

> The getData(format, data) method must run the following steps:
> If the DataTransfer object is no longer associated with a drag data store, 
> abort these steps. Nothing happens.

What does "Nothing happens" actually mean? I believe it should return undefined, which might be covered by "nothing happens" but it would be clearer to just say "return undefined".

Also, in step 7:
> If there is no item in the drag data store item list whose kind is
> Plain Unicode string and whose type string is equal to format, return
> the empty string and abort these steps.

This doesn't match WebKit per my testing, it should return undefined (tested with Chrome/Win).
Comment 1 Ian 'Hixie' Hickson 2011-02-18 23:22:08 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: 

Please file only one issue per bug.

Regarding the first thing: oops. Fixed. Getters can never just "do nothing", they always have to return something.

Regarding the second thing: It can't return 'undefined', since that's not a kind of DOMString. Sounds like a bug in Chrome.
Comment 2 contributor 2011-02-18 23:22:54 UTC
Checked in as WHATWG revision r5909.
Check-in comment: 'do nothing' doesn't make sense for a getter.
http://html5.org/tools/web-apps-tracker?from=5908&to=5909
Comment 3 Hallvord R. M. Steen 2011-02-20 14:14:49 UTC
OK, thanks Ian. I've updated three tests to require the empty string.
Comment 4 Michael[tm] Smith 2011-08-04 05:03:31 UTC
mass-moved component to LC1