-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: refactor custom component registration config
- Loading branch information
1 parent
effeec5
commit c006e6f
Showing
4 changed files
with
15 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,4 @@ | ||
import { AuroCarousel } from './src/auro-carousel.js'; | ||
import * as RuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs'; | ||
|
||
/** | ||
* Register Custom Element. | ||
* @param {Object} name - Name to use for custom element. | ||
* @returns {void} | ||
*/ | ||
const registerComponent = (name = 'custom-carousel') => { | ||
// alias definition | ||
if (!customElements.get(name)) { | ||
customElements.define(name, class extends AuroCarousel {}); | ||
} | ||
} | ||
|
||
export { registerComponent } | ||
RuntimeUtils.default.prototype.registerComponent('custom-carousel', AuroCarousel); |