v4-without-jquery EventHandler?
Created by: ghost
v4-without-jquery has a Modal class.
How do I go about listening to events? E.g. show
, hide
, etc.
From looking at the source code, it seems I need to access EventHandler. It is not exported. Should it be exported? I went ahead and added it to index.js, and recompiled:
import Alert from './alert'
import Button from './button'
import Carousel from './carousel'
import Collapse from './collapse'
import Dropdown from './dropdown'
import Modal from './modal'
import Popover from './popover'
import ScrollSpy from './scrollspy'
import Tab from './tab'
import Toast from './toast'
import Tooltip from './tooltip'
import Util from './util'
import EventHandler from './dom/eventHandler'
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
export {
Util,
Alert,
Button,
Carousel,
Collapse,
Dropdown,
Modal,
Popover,
ScrollSpy,
Tab,
Toast,
Tooltip,
EventHandler
}
Not sure if this is the correct approach?