You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// FIXME: 12. Otherwise, if the script block's type string is an ASCII case-insensitive match for the string "speculationrules", then set el's type to "speculationrules".
249
-
//13. Otherwise, return. (No script is executed, and el's type is left as null.)
278
+
// FIXME: 13. Otherwise, if the script block's type string is an ASCII case-insensitive match for the string "speculationrules", then set el's type to "speculationrules".
279
+
//14. Otherwise, return. (No script is executed, and el's type is left as null.)
250
280
else {
251
281
VERIFY(m_script_type == ScriptType::Null);
252
282
return;
253
283
}
254
284
255
-
//14. If parser document is non-null, then set el's parser document back to parser document and set el's force async to false.
285
+
//15. If parser document is non-null, then set el's parser document back to parser document and set el's force async to false.
256
286
if (parser_document) {
257
287
m_parser_document = parser_document;
258
288
m_force_async = false;
259
289
}
260
290
261
-
//15. Set el's already started to true.
291
+
//16. Set el's already started to true.
262
292
m_already_started = true;
263
293
264
-
//16. Set el's preparation-time document to its node document.
294
+
//17. Set el's preparation-time document to its node document.
265
295
m_preparation_time_document = &document();
266
296
267
-
//17. If parser document is non-null, and parser document is not equal to el's preparation-time document, then return.
297
+
//18. If parser document is non-null, and parser document is not equal to el's preparation-time document, then return.
268
298
if (parser_document != nullptr && parser_document != m_preparation_time_document) {
269
299
dbgln("HTMLScriptElement: Refusing to run script because the parser document is not the same as the preparation time document.");
270
300
return;
271
301
}
272
302
273
-
//18. If scripting is disabled for el, then return.
303
+
//19. If scripting is disabled for el, then return.
274
304
if (is_scripting_disabled()) {
275
305
dbgln("HTMLScriptElement: Refusing to run script because scripting is disabled.");
276
306
return;
277
307
}
278
308
279
-
//19. If el has a nomodule content attribute and its type is "classic", then return.
309
+
//20. If el has a nomodule content attribute and its type is "classic", then return.
280
310
if (m_script_type == ScriptType::Classic && has_attribute(HTML::AttributeNames::nomodule)) {
281
311
dbgln("HTMLScriptElement: Refusing to run classic script because it has the nomodule attribute.");
282
312
return;
283
313
}
284
314
285
-
// FIXME: 20. Let cspType be "script speculationrules" if el's type is "speculationrules"; otherwise, "script".
315
+
// FIXME: 21. Let cspType be "script speculationrules" if el's type is "speculationrules"; otherwise, "script".
286
316
287
-
//21. If el does not have a src content attribute, and the Should element's inline behavior be blocked by Content
317
+
//22. If el does not have a src content attribute, and the Should element's inline behavior be blocked by Content
288
318
// Security Policy? algorithm returns "Blocked" when given el, cspType, and source text, then return [CSP]
//24. Let classic script CORS setting be the current state of el's crossorigin content attribute.
367
+
//25. Let classic script CORS setting be the current state of el's crossorigin content attribute.
338
368
auto classic_script_cors_setting = m_crossorigin;
339
369
340
-
//25. Let module script credentials mode be the CORS settings attribute credentials mode for el's crossorigin content attribute.
370
+
//26. Let module script credentials mode be the CORS settings attribute credentials mode for el's crossorigin content attribute.
341
371
auto module_script_credential_mode = cors_settings_attribute_credentials_mode(m_crossorigin);
342
372
343
-
//26. Let cryptographic nonce be el's [[CryptographicNonce]] internal slot's value.
373
+
//27. Let cryptographic nonce be el's [[CryptographicNonce]] internal slot's value.
344
374
auto cryptographic_nonce = m_cryptographic_nonce;
345
375
346
-
//27. If el has an integrity attribute, then let integrity metadata be that attribute's value.
376
+
//28. If el has an integrity attribute, then let integrity metadata be that attribute's value.
347
377
// Otherwise, let integrity metadata be the empty string.
348
378
String integrity_metadata;
349
379
if (auto maybe_integrity = attribute(HTML::AttributeNames::integrity); maybe_integrity.has_value()) {
350
380
integrity_metadata = *maybe_integrity;
351
381
}
352
382
353
-
//28. Let referrer policy be the current state of el's referrerpolicy content attribute.
383
+
//29. Let referrer policy be the current state of el's referrerpolicy content attribute.
354
384
auto referrer_policy = m_referrer_policy;
355
385
356
-
//29. Let fetch priority be the current state of el's fetchpriority content attribute.
386
+
//30. Let fetch priority be the current state of el's fetchpriority content attribute.
357
387
auto fetch_priority = Fetch::Infrastructure::request_priority_from_string(get_attribute_value(HTML::AttributeNames::fetchpriority)).value_or(Fetch::Infrastructure::Request::Priority::Auto);
358
388
359
-
//30. Let parser metadata be "parser-inserted" if el is parser-inserted, and "not-parser-inserted" otherwise.
389
+
//31. Let parser metadata be "parser-inserted" if el is parser-inserted, and "not-parser-inserted" otherwise.
0 commit comments