mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
fix(react): duplicate events being fired in ionic/react (#17321)
This commit is contained in:
@ -1,26 +1,5 @@
|
||||
import { addIcons } from 'ionicons';
|
||||
import { ICON_PATHS } from 'ionicons/icons';
|
||||
import { IonicConfig } from '@ionic/core';
|
||||
import { defineCustomElements } from '@ionic/core/loader';
|
||||
|
||||
export * from './components';
|
||||
|
||||
export interface IonicGlobal {
|
||||
config?: any;
|
||||
ael?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void;
|
||||
raf?: (ts: number) => void;
|
||||
rel?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void;
|
||||
}
|
||||
export * from './types';
|
||||
|
||||
export interface IonicWindow extends Window {
|
||||
Ionic: IonicGlobal;
|
||||
}
|
||||
|
||||
export function registerIonic(config: IonicConfig = {}) {
|
||||
const win: IonicWindow = window as any;
|
||||
const Ionic = (win.Ionic = win.Ionic || {});
|
||||
addIcons(ICON_PATHS);
|
||||
|
||||
Ionic.config = config;
|
||||
defineCustomElements(window);
|
||||
}
|
||||
export * from './register';
|
||||
|
Reference in New Issue
Block a user