mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
safe register element
This commit is contained in:
1 parent
d6893079f7
commit
b2c8667c53
2 files changed
+28
-24
No files matched your search
@@ -3,8 +3,10 @@ import { createApp, reactive } from 'vue'
|
||||
import Form from './submission_form/form'
|
||||
import DownloadButton from './elements/download_button'
|
||||
|
||||
window.customElements.define('download-button', DownloadButton)
|
||||
window.customElements.define('submission-form', class extends HTMLElement {
|
||||
const safeRegisterElement = (name, element, options = {}) => !window.customElements.get(name) && window.customElements.define(name, element, options)
|
||||
|
||||
safeRegisterElement('download-button', DownloadButton)
|
||||
safeRegisterElement('submission-form', class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
this.appElem = document.createElement('div')
|
||||
|
||||
|
||||
Reference in new issue
Block a user