How to use the @ionic/core/loader.defineCustomElements function in @ionic/core

To help you get started, we’ve selected a few @ionic/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github deckgo / deckdeckgo-starter / src / index.js View on Github external
import './scripts/loading.js';
import './scripts/slider.js';
import './scripts/sliderJumpTo.js';
import './scripts/modalNotes.js';
import './scripts/modalRemoteControl.js';
import './scripts/remoteControl.js';
import './scripts/actions.js';
import './scripts/menu.js';
import './scripts/history.js';
import './scripts/fullscreen.js';
import './scripts/resize.js';
import './scripts/actionPlayPause.js';

import { defineCustomElements as ionicElements } from '@ionic/core/loader';
ionicElements(window);

import { defineCustomElements as ioniconsElements } from 'ionicons/dist/loader';
ioniconsElements(window);

// Init DeckDeckGo elements
import { defineCustomElements as deckDeckGoElements } from '@deckdeckgo/core/dist/loader';

import {defineCustomElements as deckDeckGoSlideTitleElements } from '@deckdeckgo/slide-title/dist/loader';
import {defineCustomElements as deckDeckGoSlideContentElements } from '@deckdeckgo/slide-content/dist/loader';
import {defineCustomElements as deckDeckGoSlideAuthorElements } from '@deckdeckgo/slide-author/dist/loader';
import {defineCustomElements as deckDeckGoSlideChartElements } from '@deckdeckgo/slide-chart/dist/loader';
import {defineCustomElements as deckDeckGoSlideYoutubeElements } from '@deckdeckgo/slide-youtube/dist/loader';
import {defineCustomElements as deckDeckGoSlideSplitElements } from '@deckdeckgo/slide-split/dist/loader';
import {defineCustomElements as deckDeckGoSlideCodeElements } from '@deckdeckgo/slide-code/dist/loader';
import {defineCustomElements as deckDeckGoSlideCountdownElements } from '@deckdeckgo/slide-countdown/dist/loader';
import {defineCustomElements as deckDeckGoSlideGifElements } from '@deckdeckgo/slide-gif/dist/loader';
github ionic-team / ionic / packages / react / src / components / index.ts View on Github external
'arrow-back-sharp': arrowBackSharp,
  'chevron-back': chevronBack,
  'chevron-forward': chevronForward,
  'close-circle': closeCircle,
  'close-sharp': closeSharp,
  'menu-outline': menuOutline,
  'menu-sharp': menuSharp,
  'reorder-two-sharp': reorderTwoSharp,
  'reorder-three-outline': reorderThreeOutline,
  'search-outline': searchOutline,
  'search-sharp': searchSharp,
});

// TODO: defineCustomElements() is asyncronous
// We need to use the promise
defineCustomElements(window);
github ionic-team / ionic / packages / react / src / components / __tests__ / IonButton.spec.tsx View on Github external
beforeAll(async (done) => {
    await defineCustomElements(window);
    done();
  })
github ModusCreateOrg / ionic-vue / src / ionic.js View on Github external
init(opts = {}) {
    defineCustomElements(window, opts)
  },
}
github ionic-team / ionic-react-conference-app / src / ionic.tsx View on Github external
function registerIonic(config: IonicConfig = {}) {
  console.log(process.env.PUBLIC_URL);
  const win: IonicWindow = window as any;
  const Ionic = (win.Ionic = win.Ionic || {});

  Ionic.config = config;
  defineCustomElements(window);
}
github ionic-team / ionic / angular / src / app-initialize.ts View on Github external
return applyPolyfills().then(() => {
        return defineCustomElements(win, {
          exclude: ['ion-tabs', 'ion-tab'],
          syncQueue: true,
          raf,
          jmp: (h: any) => zone.runOutsideAngular(h),
          ael(elm, eventName, cb, opts) {
            (elm as any)[aelFn](eventName, cb, opts);
          },
          rel(elm, eventName, cb, opts) {
            elm.removeEventListener(eventName, cb, opts);
          }
        });
      });
    }
github ionic-team / ionic / angular / src / app-initialize.ts View on Github external
return applyPolyfills().then(() => {
        return defineCustomElements(win, {
          exclude: ['ion-tabs', 'ion-tab'],
          resourcesUrl: document.baseURI,
          syncQueue: true,
          raf: h => (win.__zone_symbol__requestAnimationFrame) ? win.__zone_symbol__requestAnimationFrame(h) : requestAnimationFrame(h),
          ael(elm, eventName, cb, opts) {
            if ((elm as any).__zone_symbol__addEventListener && skipZone(eventName)) {
              (elm as any).__zone_symbol__addEventListener(eventName, cb, opts);
            } else {
              elm.addEventListener(eventName, cb, opts);
            }
          },
          rel(elm, eventName, cb, opts) {
            if ((elm as any).__zone_symbol__removeEventListener && skipZone(eventName)) {
              (elm as any).__zone_symbol__removeEventListener(eventName, cb, opts);
            } else {
              elm.removeEventListener(eventName, cb, opts);