@@ -364,7 +364,8 @@ const JSFunctionSpec methods[] = {
364
364
// [Symbol.iterator] added in init_class.
365
365
JS_FS_END};
366
366
367
- const JSPropertySpec properties[] = {JS_PS_END};
367
+ const JSPropertySpec properties[] = {
368
+ JS_STRING_SYM_PS (toStringTag, " URLSearchParams" , JSPROP_READONLY), JS_PS_END};
368
369
bool constructor (JSContext *cx, unsigned argc, Value *vp);
369
370
CLASS_BOILERPLATE_CUSTOM_INIT (URLSearchParams)
370
371
@@ -457,6 +458,7 @@ const JSPropertySpec properties[] = {
457
458
JS_PSGS (" search" , search_get, search_set, JSPROP_ENUMERATE),
458
459
JS_PSG (" searchParams" , searchParams_get, JSPROP_ENUMERATE),
459
460
JS_PSGS (" username" , username_get, username_set, JSPROP_ENUMERATE),
461
+ JS_STRING_SYM_PS (toStringTag, " URL" , JSPROP_READONLY),
460
462
JS_PS_END};
461
463
bool constructor (JSContext *cx, unsigned argc, Value *vp);
462
464
CLASS_BOILERPLATE (URL)
@@ -2724,8 +2726,10 @@ bool writable_get(JSContext *cx, unsigned argc, Value *vp) {
2724
2726
2725
2727
const JSFunctionSpec methods[] = {JS_FS_END};
2726
2728
2727
- const JSPropertySpec properties[] = {JS_PSG (" readable" , readable_get, JSPROP_ENUMERATE),
2728
- JS_PSG (" writable" , writable_get, JSPROP_ENUMERATE), JS_PS_END};
2729
+ const JSPropertySpec properties[] = {
2730
+ JS_PSG (" readable" , readable_get, JSPROP_ENUMERATE),
2731
+ JS_PSG (" writable" , writable_get, JSPROP_ENUMERATE),
2732
+ JS_STRING_SYM_PS (toStringTag, " TransformStream" , JSPROP_READONLY), JS_PS_END};
2729
2733
2730
2734
bool constructor (JSContext *cx, unsigned argc, Value *vp);
2731
2735
@@ -4257,6 +4261,7 @@ const JSPropertySpec properties[] = {
4257
4261
JS_PSGS (" surrogateKey" , accessor_get<surrogate_key_get>, accessor_set<surrogate_key_set>,
4258
4262
JSPROP_ENUMERATE),
4259
4263
JS_PSGS (" pci" , accessor_get<pci_get>, accessor_set<pci_set>, JSPROP_ENUMERATE),
4264
+ JS_STRING_SYM_PS (toStringTag, " CacheOverride" , JSPROP_READONLY),
4260
4265
JS_PS_END};
4261
4266
4262
4267
bool constructor (JSContext *cx, unsigned argc, Value *vp);
@@ -4524,6 +4529,7 @@ const JSPropertySpec properties[] = {JS_PSG("method", method_get, JSPROP_ENUMERA
4524
4529
JS_PSG (" headers" , headers_get, JSPROP_ENUMERATE),
4525
4530
JS_PSG (" body" , body_get, JSPROP_ENUMERATE),
4526
4531
JS_PSG (" bodyUsed" , bodyUsed_get, JSPROP_ENUMERATE),
4532
+ JS_STRING_SYM_PS (toStringTag, " Request" , JSPROP_READONLY),
4527
4533
JS_PS_END};
4528
4534
4529
4535
bool constructor (JSContext *cx, unsigned argc, Value *vp);
@@ -5357,6 +5363,7 @@ const JSPropertySpec properties[] = {JS_PSG("type", type_get, JSPROP_ENUMERATE),
5357
5363
JS_PSG (" headers" , headers_get, JSPROP_ENUMERATE),
5358
5364
JS_PSG (" body" , body_get, JSPROP_ENUMERATE),
5359
5365
JS_PSG (" bodyUsed" , bodyUsed_get, JSPROP_ENUMERATE),
5366
+ JS_STRING_SYM_PS (toStringTag, " Response" , JSPROP_READONLY),
5360
5367
JS_PS_END};
5361
5368
5362
5369
bool constructor (JSContext *cx, unsigned argc, Value *vp);
@@ -5664,7 +5671,9 @@ bool encoding_get(JSContext *cx, unsigned argc, Value *vp) {
5664
5671
5665
5672
const JSFunctionSpec methods[] = {JS_FN (" encode" , encode, 1 , JSPROP_ENUMERATE), JS_FS_END};
5666
5673
5667
- const JSPropertySpec properties[] = {JS_PSG (" encoding" , encoding_get, JSPROP_ENUMERATE), JS_PS_END};
5674
+ const JSPropertySpec properties[] = {JS_PSG (" encoding" , encoding_get, JSPROP_ENUMERATE),
5675
+ JS_STRING_SYM_PS (toStringTag, " TextEncoder" , JSPROP_READONLY),
5676
+ JS_PS_END};
5668
5677
bool constructor (JSContext *cx, unsigned argc, Value *vp);
5669
5678
CLASS_BOILERPLATE (TextEncoder)
5670
5679
@@ -5725,7 +5734,9 @@ bool encoding_get(JSContext *cx, unsigned argc, Value *vp) {
5725
5734
5726
5735
const JSFunctionSpec methods[] = {JS_FN (" decode" , decode, 1 , JSPROP_ENUMERATE), JS_FS_END};
5727
5736
5728
- const JSPropertySpec properties[] = {JS_PSG (" encoding" , encoding_get, JSPROP_ENUMERATE), JS_PS_END};
5737
+ const JSPropertySpec properties[] = {JS_PSG (" encoding" , encoding_get, JSPROP_ENUMERATE),
5738
+ JS_STRING_SYM_PS (toStringTag, " TextDecoder" , JSPROP_READONLY),
5739
+ JS_PS_END};
5729
5740
bool constructor (JSContext *cx, unsigned argc, Value *vp);
5730
5741
CLASS_BOILERPLATE (TextDecoder)
5731
5742
@@ -7277,7 +7288,8 @@ bool next(JSContext *cx, unsigned argc, Value *vp) {
7277
7288
7278
7289
const JSFunctionSpec methods[] = {JS_FN (" next" , next, 0 , JSPROP_ENUMERATE), JS_FS_END};
7279
7290
7280
- const JSPropertySpec properties[] = {JS_PS_END};
7291
+ const JSPropertySpec properties[] = {
7292
+ JS_STRING_SYM_PS (toStringTag, " URLSearchParamsIterator" , JSPROP_READONLY), JS_PS_END};
7281
7293
7282
7294
CLASS_BOILERPLATE_CUSTOM_INIT (URLSearchParamsIterator)
7283
7295
@@ -7636,6 +7648,7 @@ const JSPropertySpec properties[] = {JS_PSG("href", href_get, JSPROP_ENUMERATE),
7636
7648
JS_PSG (" pathname" , pathname_get, JSPROP_ENUMERATE),
7637
7649
JS_PSG (" search" , search_get, JSPROP_ENUMERATE),
7638
7650
JS_PSG (" hash" , hash_get, JSPROP_ENUMERATE),
7651
+ JS_STRING_SYM_PS (toStringTag, " Location" , JSPROP_READONLY),
7639
7652
JS_PS_END};
7640
7653
7641
7654
CLASS_BOILERPLATE_CUSTOM_INIT (WorkerLocation)
0 commit comments