Issue #2158 - Part 2: Handle and expose preload link destination to DOM

This also defines known preload destinations and ensures it is reflected in JS.
This commit is contained in:
FranklinDM 2023-03-11 16:42:18 +08:00 committed by roytam1
commit 24189770aa
11 changed files with 98 additions and 5 deletions

View file

@ -174,6 +174,8 @@ static uint32_t ToLinkMask(const nsAString& aLink, nsIPrincipal* aPrincipal)
return nsStyleLinkElement::eHTMLIMPORT;
else if (aLink.EqualsLiteral("preconnect"))
return nsStyleLinkElement::ePRECONNECT;
else if (aLink.EqualsLiteral("preload"))
return nsStyleLinkElement::ePRELOAD;
else
return 0;
}