From b3256a40b63da539009fb4a42d7d45e71be9a2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Thu, 11 Jul 2019 13:40:19 +1000 Subject: [PATCH] Update to Web IDL changes to optional dictionary defaulting --- index.bs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 1edd0f0..e1f766a 100644 --- a/index.bs +++ b/index.bs @@ -221,7 +221,7 @@ Further normative definition of snapshot state can be found for {{File}}s [Constructor(optional sequence<BlobPart> blobParts, - optional BlobPropertyBag options), + optional BlobPropertyBag options = {}), Exposed=(Window,Worker), Serializable] interface Blob { @@ -298,8 +298,7 @@ user agents must run the following steps: 1. Let |bytes| be the result of [=processing blob parts=] given {{blobParts}} and {{Blob/Blob(blobParts, options)/options}}. -1. If the {{BlobPropertyBag/type}} member of the optional {{Blob/Blob(blobParts, options)/options}} argument is provided - and is not the empty string, +1. If the {{BlobPropertyBag/type}} member of the {{Blob/Blob(blobParts, options)/options}} argument is not the empty string, run the following sub-steps: 1. Let |t| be the {{BlobPropertyBag/type}} dictionary member. @@ -646,7 +645,7 @@ and must follow the <dfn export>file type guidelines</dfn> below: <pre class="idl"> [Constructor(sequence&lt;BlobPart> fileBits, USVString fileName, - optional FilePropertyBag options), + optional FilePropertyBag options = {}), Exposed=(Window,Worker), Serializable] interface File : Blob { readonly attribute DOMString name; @@ -699,8 +698,7 @@ user agents must run the following steps: Note: Underlying OS filesystems use differing conventions for file name; with constructed files, mandating UTF-16 lessens ambiquity when file names are converted to <a>byte</a> sequences. -3. If the optional {{FilePropertyBag}} dictionary argument is used, - then run the following substeps: +3. Process {{FilePropertyBag}} dictionary argument by running the following substeps: 1. If the {{BlobPropertyBag/type}} member is provided and is not the empty string, let |t| be set to the {{BlobPropertyBag/type}} dictionary member.