summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-03-21 02:52:05 +0800
committerGitHub <noreply@github.com>2023-03-20 19:52:05 +0100
commit0732ba32ee9e9d0677a58469d0cf290ec8d5d1c5 (patch)
tree8a1fa249195d5c02f443ecc910c1d8d52710331c /web_src
parent726d6a5077718663b639434a9e24ee16fb4fecb8 (diff)
downloadgitea-0732ba32ee9e9d0677a58469d0cf290ec8d5d1c5.tar.gz
gitea-0732ba32ee9e9d0677a58469d0cf290ec8d5d1c5.zip
Polyfill the window.customElements (#23592) (#23595)
Backport #23592 Close #23590 It seems that some browsers don't support customElements
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/webcomponents/GiteaOriginUrl.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/web_src/js/webcomponents/GiteaOriginUrl.js b/web_src/js/webcomponents/GiteaOriginUrl.js
index 47fd13bfc1..c8736ac5c5 100644
--- a/web_src/js/webcomponents/GiteaOriginUrl.js
+++ b/web_src/js/webcomponents/GiteaOriginUrl.js
@@ -1,3 +1,5 @@
+import '@webcomponents/custom-elements'; // automatically adds custom elements for older browsers that don't support it
+
// this is a Gitea's private HTML component, it converts an absolute or relative URL to an absolute URL with the current origin
window.customElements.define('gitea-origin-url', class extends HTMLElement {
connectedCallback() {