Splitting from #628. As I think this make sense regardless of the outcome of that PR.
Motivation here is that the algorithms for both empty cases become no-op if the lists are empty -
For events:
Update the event map
Step 5 -> Step 7.1.1 is looped over a empty list.
For Contexts:
Update the event map
Step 5 -> Step 8.3.2 is looped over a empty list.
The part about contexts: [] becomes consistent with addPreloadScript and addInterception as they both fail on empty list.
Splitting from #628. As I think this make sense regardless of the outcome of that PR. Motivation here is that the algorithms for both empty cases become no-op if the lists are empty - For events: Update the event map Step 5 -> Step 7.1.1 is looped over a empty list. For Contexts: Update the event map Step 5 -> Step 8.3.2 is looped over a empty list.
The part about
contexts: []
becomes consistent withaddPreloadScript
andaddInterception
as they both fail on empty list.Preview | Diff