From 16b8cc66432b454879db56ba10d64ecb4f5eecf4 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 27 Feb 2026 11:25:22 +0100 Subject: [PATCH] lib: improve argument handling in Blob constructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As specified in WebIDL (), the fields of a dictionary need to be read in lexicographical order. PR-URL: https://github.com/nodejs/node/pull/61980 Reviewed-By: Jason Zhang Reviewed-By: Mattias Buelens Reviewed-By: René Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- lib/internal/blob.js | 2 +- test/wpt/status/FileAPI/blob.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/internal/blob.js b/lib/internal/blob.js index 46abb4f793c..e42773a8d03 100644 --- a/lib/internal/blob.js +++ b/lib/internal/blob.js @@ -149,8 +149,8 @@ class Blob { } validateDictionary(options, 'options'); let { - type = '', endings = 'transparent', + type = '', } = options ?? kEmptyObject; endings = `${endings}`; diff --git a/test/wpt/status/FileAPI/blob.json b/test/wpt/status/FileAPI/blob.json index 3bbd15087a0..a82a9cb0cfd 100644 --- a/test/wpt/status/FileAPI/blob.json +++ b/test/wpt/status/FileAPI/blob.json @@ -10,7 +10,6 @@ "blobParts not an object: BigInt with BigInt.prototype[Symbol.iterator]", "blobParts not an object: Symbol with Symbol.prototype[Symbol.iterator]", "Getters and value conversions should happen in order until an exception is thrown.", - "options properties should be accessed in lexicographic order.", "Arguments should be evaluated from left to right." ], "flaky": [