Bug 112295

Summary: Custom bindings for Cliipboard::types() shouldn't return null if empty
Product: WebKit Reporter: Daniel Cheng <dcheng>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

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).