Bug 112295 - Custom bindings for Cliipboard::types() shouldn't return null if empty
Summary: Custom bindings for Cliipboard::types() shouldn't return null if empty
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-13 15:16 PDT by Daniel Cheng
Modified: 2013-03-13 15:16 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Cheng 2013-03-13 15:16:56 PDT
The spec does not define DataTransfer.types as a nullable type:
15:06 < dcheng> Question... if the spec defines an attribute to return a DOMString[], it would be 
                incorrect to return null if it's empty right?
15:07 < annevk> dcheng: yes

So we shouldn't ever be returning null.

Mozilla's implementation of DataTransfer confirms this: http://mxr.mozilla.org/mozilla-central/source/content/events/src/nsDOMDataTransfer.cpp#265 always returns a non-null list (unless the allocator failed).