Skip to content

Commit

Permalink
Add custom element callback to app.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Oct 20, 2024
1 parent a8a3fea commit 5380d08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions src/js/hcaptcha/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import HCaptchaCustomElement from './hcaptcha-custom-element';
const hCaptcha = new HCaptcha();

window.hCaptcha = hCaptcha;

new HCaptchaCustomElement();
window.customElements.define( 'h-captcha', HCaptchaCustomElement );

window.hCaptchaGetWidgetId = ( el ) => {
hCaptcha.getWidgetId( el );
Expand Down
2 changes: 0 additions & 2 deletions src/js/hcaptcha/hcaptcha-custom-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ class HCaptchaCustomElement extends HTMLElement {
}
}

window.customElements.define( 'h-captcha', HCaptchaCustomElement );

export default HCaptchaCustomElement;

0 comments on commit 5380d08

Please sign in to comment.