We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6772e77 commit 95e26e2Copy full SHA for 95e26e2
lib/renderer/web-view/web-view-attributes.ts
@@ -3,13 +3,8 @@ import { WebViewImpl } from '@electron/internal/renderer/web-view/web-view-impl'
3
import { WEB_VIEW_CONSTANTS } from '@electron/internal/renderer/web-view/web-view-constants';
4
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
5
6
-// Helper function to resolve url set in attribute.
7
-const a = document.createElement('a');
8
-
9
const resolveURL = function (url?: string | null) {
10
- if (!url) return '';
11
- a.href = url;
12
- return a.href;
+ return url ? new URL(url, location.href).href : '';
13
};
14
15
interface MutationHandler {
0 commit comments