Issue #2495 - Implement webkitURL legacy window alias for URL

Resolves #2495
This commit is contained in:
Moonchild 2024-04-06 14:08:41 +02:00 committed by roytam1
commit 73edd3878f
2 changed files with 9 additions and 0 deletions

View file

@ -55,6 +55,14 @@ public:
Constructor(const GlobalObject& aGlobal, const nsAString& aURL,
const Optional<nsAString>& aBase, ErrorResult& aRv);
// Helper for window.URL constructor
static already_AddRefed<URL>
WebkitURL(const GlobalObject& aGlobal, const nsAString& aURL,
const Optional<nsAString>& aBase, ErrorResult& aRv)
{
return Constructor(aGlobal, aURL, aBase, aRv);
}
// Helper for Fetch API
static already_AddRefed<URL>
WorkerConstructor(const GlobalObject& aGlobal, const nsAString& aURL,