From 5372f52a9f66ef1707b6359cb65698385cc5a5cb Mon Sep 17 00:00:00 2001 From: Jeremy Roman Date: Wed, 10 Jan 2024 18:11:52 -0500 Subject: [PATCH] don't even validate the source key -- ignore it entirely --- speculation-rules.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/speculation-rules.bs b/speculation-rules.bs index 47dbb06..60b36b9 100644 --- a/speculation-rules.bs +++ b/speculation-rules.bs @@ -371,10 +371,10 @@ add the following step To parse a speculation rule given a [=map=] |input|, a [=document=] |document|, and a [=URL=] |baseURL|, perform the following steps. They return a [=speculation rule=] or null. 1. If |input| has any [=map/key=] other than "`source`", "`urls`", "`where`", "`requires`", "`target_hint`","`referrer_policy`", "`relative_to`", "`eagerness`", and "`expects_no_vary_search`" then return null. + +

In a previous version of this specification, it was necessary to specify the type of source of the URLs. This is now automatically inferred from other keys, and the "`source`" key is ignored.

1. Let |source| be null. - 1. If |input|["`source`"] exists, then: - 1. Set |source| to |input|["`source`"]. - 1. Otherwise, if |input|["`urls`"] [=map/exists=] and |input|["`where`"] does not [=map/exist=], then: + 1. If |input|["`urls`"] [=map/exists=] and |input|["`where`"] does not [=map/exist=], then: 1. Set |source| to "`list`". 1. Otherwise, if |input|["`where`"] [=map/exists=] and |input|["`urls`"] does not [=map/exist=], then: 1. Set |source| to "`document`".