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 16724 - Blob without arguments underdefined
Summary: Blob without arguments underdefined
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: File API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Arun
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-13 11:28 UTC by Simon Pieters
Modified: 2012-05-07 05:03 UTC (History)
2 users (show)

See Also:


Attachments

Description Simon Pieters 2012-04-13 11:28:57 UTC
The spec should say what to set the data to (when invoked with no arguments), what to set the type to (if not specified), what 'endings' should be (if the second argument is omitted altogether), etc.

Ideally I'd like the spec to have a single algorithm for when the constructor is invoked, where all values are initialized to the appropriate things, then the arguments are examined and change the values as appropriate, then a new Blob object is created with those values set and that is returned. (See http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#dom-websocket for an example of this style to spec constructors that doesn't leave things undefined.)
Comment 1 Simon Pieters 2012-04-13 11:40:06 UTC
> what 'endings' should be (if the second argument is omitted altogether)

Actually WebIDL should probably define this. However, the "a user agent MUST treat this as having a default value of "transparent"" requirement should be removed since it is covered in WebIDL.
Comment 2 Simon Pieters 2012-04-13 11:43:14 UTC
The type default value should probably be specced in the IDL:

    dictionary BlobPropertyBag {
		
      DOMString type = "";
      DOMString endings = "transparent";
	
    };
Comment 3 Simon Pieters 2012-04-13 11:47:38 UTC
(In reply to comment #1)
> Actually WebIDL should probably define this.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16725
Comment 4 Arun 2012-05-07 05:03:30 UTC
Marking this fixed. http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob