@thednp/shorty 2.0.7 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -26
- package/dist/shorty.cjs +1 -1
- package/dist/shorty.cjs.map +1 -1
- package/dist/shorty.d.ts +235 -138
- package/dist/shorty.js +1 -1
- package/dist/shorty.js.map +1 -1
- package/dist/shorty.mjs +536 -600
- package/dist/shorty.mjs.map +1 -1
- package/package.json +9 -8
- package/.eslintrc.cjs +0 -224
- package/.lgtm.yml +0 -8
- package/.prettierrc.json +0 -15
- package/src/attr/getAttribute.ts +0 -11
- package/src/attr/getAttributeNS.ts +0 -12
- package/src/attr/hasAttribute.ts +0 -11
- package/src/attr/hasAttributeNS.ts +0 -15
- package/src/attr/removeAttribute.ts +0 -10
- package/src/attr/removeAttributeNS.ts +0 -14
- package/src/attr/setAttribute.ts +0 -11
- package/src/attr/setAttributeNS.ts +0 -16
- package/src/blocks/documentBody.ts +0 -5
- package/src/blocks/documentElement.ts +0 -5
- package/src/blocks/documentHead.ts +0 -5
- package/src/boolean/isApple.ts +0 -15
- package/src/boolean/isFirefox.ts +0 -9
- package/src/boolean/isMobile.ts +0 -14
- package/src/boolean/support3DTransform.ts +0 -7
- package/src/boolean/supportAnimation.ts +0 -7
- package/src/boolean/supportPassive.ts +0 -29
- package/src/boolean/supportTouch.ts +0 -9
- package/src/boolean/supportTransform.ts +0 -7
- package/src/boolean/supportTransition.ts +0 -7
- package/src/class/addClass.ts +0 -11
- package/src/class/hasClass.ts +0 -11
- package/src/class/removeClass.ts +0 -11
- package/src/event/off.ts +0 -18
- package/src/event/on.ts +0 -18
- package/src/event/one.ts +0 -26
- package/src/get/getBoundingClientRect.ts +0 -44
- package/src/get/getDocument.ts +0 -24
- package/src/get/getDocumentBody.ts +0 -13
- package/src/get/getDocumentElement.ts +0 -13
- package/src/get/getDocumentHead.ts +0 -14
- package/src/get/getElementAnimationDelay.ts +0 -25
- package/src/get/getElementAnimationDuration.ts +0 -25
- package/src/get/getElementStyle.ts +0 -25
- package/src/get/getElementTransitionDelay.ts +0 -25
- package/src/get/getElementTransitionDuration.ts +0 -25
- package/src/get/getNodeScroll.ts +0 -22
- package/src/get/getParentNode.ts +0 -28
- package/src/get/getRectRelativeToOffsetParent.ts +0 -43
- package/src/get/getUID.ts +0 -42
- package/src/get/getWindow.ts +0 -23
- package/src/index.ts +0 -571
- package/src/interface/boundingClientRect.d.ts +0 -10
- package/src/interface/css4Declaration.d.ts +0 -4
- package/src/interface/customElement.d.ts +0 -8
- package/src/interface/event.d.ts +0 -255
- package/src/interface/fn.ts +0 -1
- package/src/interface/navigatorUA.d.ts +0 -15
- package/src/interface/offsetRect.d.ts +0 -6
- package/src/interface/originalEvent.d.ts +0 -4
- package/src/is/isArray.ts +0 -10
- package/src/is/isCanvas.ts +0 -13
- package/src/is/isCustomElement.ts +0 -15
- package/src/is/isDocument.ts +0 -14
- package/src/is/isElement.ts +0 -28
- package/src/is/isElementInScrollRange.ts +0 -20
- package/src/is/isElementInViewport.ts +0 -21
- package/src/is/isElementsArray.ts +0 -13
- package/src/is/isFunction.ts +0 -12
- package/src/is/isHTMLCollection.ts +0 -12
- package/src/is/isHTMLElement.ts +0 -13
- package/src/is/isHTMLImageElement.ts +0 -12
- package/src/is/isJSON.ts +0 -20
- package/src/is/isMap.ts +0 -11
- package/src/is/isMedia.ts +0 -26
- package/src/is/isNode.ts +0 -19
- package/src/is/isNodeList.ts +0 -13
- package/src/is/isNumber.ts +0 -10
- package/src/is/isObject.ts +0 -10
- package/src/is/isRTL.ts +0 -11
- package/src/is/isSVGElement.ts +0 -13
- package/src/is/isScaledElement.ts +0 -20
- package/src/is/isShadowRoot.ts +0 -12
- package/src/is/isString.ts +0 -10
- package/src/is/isTableElement.ts +0 -17
- package/src/is/isWeakMap.ts +0 -11
- package/src/is/isWindow.ts +0 -13
- package/src/misc/ArrayFrom.ts +0 -11
- package/src/misc/Float32ArrayFrom.ts +0 -11
- package/src/misc/Float64ArrayFrom.ts +0 -11
- package/src/misc/ObjectAssign.ts +0 -54
- package/src/misc/ObjectEntries.ts +0 -11
- package/src/misc/ObjectFromEntries.ts +0 -11
- package/src/misc/ObjectHasOwn.ts +0 -18
- package/src/misc/ObjectKeys.ts +0 -11
- package/src/misc/ObjectValues.ts +0 -12
- package/src/misc/createCustomEvent.ts +0 -31
- package/src/misc/createElement.ts +0 -36
- package/src/misc/createElementNS.ts +0 -40
- package/src/misc/data.ts +0 -80
- package/src/misc/dispatchEvent.ts +0 -10
- package/src/misc/distinct.ts +0 -19
- package/src/misc/emulateAnimationEnd.ts +0 -43
- package/src/misc/emulateTransitionEnd.ts +0 -42
- package/src/misc/focus.ts +0 -10
- package/src/misc/focusTrap.ts +0 -67
- package/src/misc/getInstance.ts +0 -9
- package/src/misc/noop.ts +0 -6
- package/src/misc/normalizeOptions.ts +0 -58
- package/src/misc/normalizeValue.ts +0 -32
- package/src/misc/passiveHandler.ts +0 -6
- package/src/misc/reflow.ts +0 -9
- package/src/misc/setElementStyle.ts +0 -26
- package/src/misc/timer.ts +0 -91
- package/src/misc/toLowerCase.ts +0 -9
- package/src/misc/toUpperCase.ts +0 -9
- package/src/selectors/closest.ts +0 -23
- package/src/selectors/getCustomElements.ts +0 -19
- package/src/selectors/getElementById.ts +0 -16
- package/src/selectors/getElementsByClassName.ts +0 -22
- package/src/selectors/getElementsByTagName.ts +0 -22
- package/src/selectors/matches.ts +0 -11
- package/src/selectors/querySelector.ts +0 -25
- package/src/selectors/querySelectorAll.ts +0 -19
- package/src/strings/DOMContentLoadedEvent.ts +0 -5
- package/src/strings/DOMMouseScrollEvent.ts +0 -5
- package/src/strings/abortEvent.ts +0 -5
- package/src/strings/addEventListener.ts +0 -5
- package/src/strings/animationDelay.ts +0 -5
- package/src/strings/animationDuration.ts +0 -5
- package/src/strings/animationEndEvent.ts +0 -5
- package/src/strings/animationName.ts +0 -5
- package/src/strings/ariaChecked.ts +0 -5
- package/src/strings/ariaDescribedBy.ts +0 -5
- package/src/strings/ariaDescription.ts +0 -5
- package/src/strings/ariaExpanded.ts +0 -5
- package/src/strings/ariaHasPopup.ts +0 -5
- package/src/strings/ariaHidden.ts +0 -5
- package/src/strings/ariaLabel.ts +0 -5
- package/src/strings/ariaLabelledBy.ts +0 -5
- package/src/strings/ariaModal.ts +0 -5
- package/src/strings/ariaPressed.ts +0 -5
- package/src/strings/ariaSelected.ts +0 -5
- package/src/strings/ariaValueMax.ts +0 -5
- package/src/strings/ariaValueMin.ts +0 -5
- package/src/strings/ariaValueNow.ts +0 -5
- package/src/strings/ariaValueText.ts +0 -5
- package/src/strings/beforeunloadEvent.ts +0 -5
- package/src/strings/bezierEasings.ts +0 -32
- package/src/strings/blurEvent.ts +0 -5
- package/src/strings/changeEvent.ts +0 -5
- package/src/strings/contextmenuEvent.ts +0 -5
- package/src/strings/dragEvent.ts +0 -5
- package/src/strings/dragendEvent.ts +0 -5
- package/src/strings/dragenterEvent.ts +0 -5
- package/src/strings/dragleaveEvent.ts +0 -5
- package/src/strings/dragoverEvent.ts +0 -5
- package/src/strings/dragstartEvent.ts +0 -5
- package/src/strings/errorEvent.ts +0 -5
- package/src/strings/focusEvent.ts +0 -5
- package/src/strings/focusEvents.ts +0 -5
- package/src/strings/focusableSelector.ts +0 -4
- package/src/strings/focusinEvent.ts +0 -5
- package/src/strings/focusoutEvent.ts +0 -5
- package/src/strings/gesturechangeEvent.ts +0 -5
- package/src/strings/gestureendEvent.ts +0 -5
- package/src/strings/gesturestartEvent.ts +0 -5
- package/src/strings/keyAlt.ts +0 -7
- package/src/strings/keyArrowDown.ts +0 -7
- package/src/strings/keyArrowLeft.ts +0 -7
- package/src/strings/keyArrowRight.ts +0 -7
- package/src/strings/keyArrowUp.ts +0 -7
- package/src/strings/keyBackspace.ts +0 -7
- package/src/strings/keyCapsLock.ts +0 -7
- package/src/strings/keyControl.ts +0 -7
- package/src/strings/keyDelete.ts +0 -7
- package/src/strings/keyEnter.ts +0 -7
- package/src/strings/keyEscape.ts +0 -7
- package/src/strings/keyInsert.ts +0 -7
- package/src/strings/keyMeta.ts +0 -7
- package/src/strings/keyNumpadEnter.ts +0 -7
- package/src/strings/keyPause.ts +0 -7
- package/src/strings/keyScrollLock.ts +0 -7
- package/src/strings/keyShift.ts +0 -7
- package/src/strings/keySpace.ts +0 -7
- package/src/strings/keyTab.ts +0 -7
- package/src/strings/keyboardEventKeys.ts +0 -26
- package/src/strings/keydownEvent.ts +0 -5
- package/src/strings/keypressEvent.ts +0 -5
- package/src/strings/keyupEvent.ts +0 -5
- package/src/strings/loadEvent.ts +0 -5
- package/src/strings/loadstartEvent.ts +0 -5
- package/src/strings/mouseClickEvents.ts +0 -5
- package/src/strings/mouseHoverEvents.ts +0 -7
- package/src/strings/mouseSwipeEvents.ts +0 -10
- package/src/strings/mouseclickEvent.ts +0 -5
- package/src/strings/mousedblclickEvent.ts +0 -5
- package/src/strings/mousedownEvent.ts +0 -5
- package/src/strings/mouseenterEvent.ts +0 -5
- package/src/strings/mousehoverEvent.ts +0 -5
- package/src/strings/mouseinEvent.ts +0 -5
- package/src/strings/mouseleaveEvent.ts +0 -5
- package/src/strings/mousemoveEvent.ts +0 -5
- package/src/strings/mouseoutEvent.ts +0 -5
- package/src/strings/mouseoverEvent.ts +0 -5
- package/src/strings/mouseupEvent.ts +0 -5
- package/src/strings/mousewheelEvent.ts +0 -5
- package/src/strings/moveEvent.ts +0 -5
- package/src/strings/nativeEvents.ts +0 -108
- package/src/strings/offsetHeight.ts +0 -5
- package/src/strings/offsetWidth.ts +0 -5
- package/src/strings/orientationchangeEvent.ts +0 -5
- package/src/strings/pointercancelEvent.ts +0 -5
- package/src/strings/pointerdownEvent.ts +0 -5
- package/src/strings/pointerleaveEvent.ts +0 -5
- package/src/strings/pointermoveEvent.ts +0 -5
- package/src/strings/pointerupEvent.ts +0 -5
- package/src/strings/readystatechangeEvent.ts +0 -5
- package/src/strings/removeEventListener.ts +0 -5
- package/src/strings/resetEvent.ts +0 -5
- package/src/strings/resizeEvent.ts +0 -5
- package/src/strings/scrollEvent.ts +0 -5
- package/src/strings/scrollHeight.ts +0 -5
- package/src/strings/scrollWidth.ts +0 -5
- package/src/strings/selectEvent.ts +0 -5
- package/src/strings/selectendEvent.ts +0 -5
- package/src/strings/selectstartEvent.ts +0 -5
- package/src/strings/submitEvent.ts +0 -5
- package/src/strings/tabindex.ts +0 -5
- package/src/strings/touchEvents.ts +0 -10
- package/src/strings/touchcancelEvent.ts +0 -5
- package/src/strings/touchendEvent.ts +0 -5
- package/src/strings/touchmoveEvent.ts +0 -5
- package/src/strings/touchstartEvent.ts +0 -5
- package/src/strings/transitionDelay.ts +0 -5
- package/src/strings/transitionDuration.ts +0 -5
- package/src/strings/transitionEndEvent.ts +0 -5
- package/src/strings/transitionProperty.ts +0 -5
- package/src/strings/unloadEvent.ts +0 -5
- package/src/strings/userAgent.ts +0 -7
- package/src/strings/userAgentData.ts +0 -8
- package/test/att.test.ts +0 -43
- package/test/boolean.test.ts +0 -30
- package/test/class.test.ts +0 -26
- package/test/event.test.ts +0 -39
- package/test/fixtures/custom-elem.js +0 -18
- package/test/fixtures/getExampleDom.ts +0 -52
- package/test/fixtures/style.css +0 -18
- package/test/get.test.ts +0 -150
- package/test/is.test.ts +0 -240
- package/test/misc.test.ts +0 -400
- package/test/selectors.test.ts +0 -90
- package/tsconfig.json +0 -36
- package/vite.config.mts +0 -45
- package/vitest.config-ui.mts +0 -26
- package/vitest.config.mts +0 -25
package/src/strings/userAgent.ts
DELETED
package/test/att.test.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { expect, it, describe, afterEach } from 'vitest';
|
|
2
|
-
import { getExampleDOM } from './fixtures/getExampleDom';
|
|
3
|
-
import * as SHORTY from '../src/index';
|
|
4
|
-
import "./fixtures/style.css";
|
|
5
|
-
|
|
6
|
-
describe('Shorty Library Tests - ATT', () => {
|
|
7
|
-
const wrapper = document.createElement('div');
|
|
8
|
-
afterEach(async () => {
|
|
9
|
-
wrapper.innerHTML = '';
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('Test attr folder', () => {
|
|
13
|
-
const container = getExampleDOM();
|
|
14
|
-
wrapper.append(container);
|
|
15
|
-
|
|
16
|
-
const {
|
|
17
|
-
getAttribute,
|
|
18
|
-
setAttribute,
|
|
19
|
-
hasAttribute,
|
|
20
|
-
removeAttribute,
|
|
21
|
-
getAttributeNS,
|
|
22
|
-
setAttributeNS,
|
|
23
|
-
hasAttributeNS,
|
|
24
|
-
removeAttributeNS,
|
|
25
|
-
querySelector,
|
|
26
|
-
} = SHORTY;
|
|
27
|
-
|
|
28
|
-
const el = querySelector('.alert', container)!;
|
|
29
|
-
expect(getAttribute(el, 'class')).to.have.length.above(0);
|
|
30
|
-
setAttribute(el, 'data-att', 'momo');
|
|
31
|
-
expect(hasAttribute(el, 'data-att')).to.be.true;
|
|
32
|
-
removeAttribute(el, 'data-att');
|
|
33
|
-
expect(hasAttribute(el, 'data-att')).to.be.false;
|
|
34
|
-
|
|
35
|
-
const svg = querySelector('svg', container)!;
|
|
36
|
-
const ns = 'http://www.w3.org/2000/svg';
|
|
37
|
-
expect(hasAttributeNS(ns, svg, 'transform')).to.be.false;
|
|
38
|
-
setAttributeNS(ns, svg, 'transform', 'scale(0.99)');
|
|
39
|
-
expect(getAttributeNS(ns, svg, 'transform')).to.eq('scale(0.99)');
|
|
40
|
-
removeAttributeNS(ns, svg, 'transform');
|
|
41
|
-
expect(getAttributeNS(ns, svg, 'transform')).to.be.null;
|
|
42
|
-
});
|
|
43
|
-
});
|
package/test/boolean.test.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { expect, it, describe } from 'vitest';
|
|
2
|
-
import * as SHORTY from '../src/index';
|
|
3
|
-
|
|
4
|
-
describe('Shorty Library Tests - BOOL', () => {
|
|
5
|
-
it('Test boolean folder', () => {
|
|
6
|
-
const {
|
|
7
|
-
// these are impossible to test 100% of the branches
|
|
8
|
-
isApple,
|
|
9
|
-
isMobile,
|
|
10
|
-
isFirefox,
|
|
11
|
-
support3DTransform,
|
|
12
|
-
supportAnimation,
|
|
13
|
-
supportPassive,
|
|
14
|
-
supportTouch,
|
|
15
|
-
supportTransform,
|
|
16
|
-
supportTransition,
|
|
17
|
-
// querySelectorAll, getWindow
|
|
18
|
-
} = SHORTY;
|
|
19
|
-
|
|
20
|
-
expect(isApple(), 'isApple').to.be.false;
|
|
21
|
-
expect(isMobile(), 'isMobile').to.be.false;
|
|
22
|
-
expect(isFirefox(), 'isFirefox').to.be.false;
|
|
23
|
-
expect(support3DTransform(), 'support3DTransform').to.be.true;
|
|
24
|
-
expect(supportAnimation(), 'supportAnimation').to.be.true;
|
|
25
|
-
expect(supportPassive(), 'supportPassive').to.be.true;
|
|
26
|
-
expect(supportTouch(), 'supportTouch').to.be.false;
|
|
27
|
-
expect(supportTransform(), 'supportTransform').to.be.true;
|
|
28
|
-
expect(supportTransition(), 'supportTransition').to.be.true;
|
|
29
|
-
});
|
|
30
|
-
});
|
package/test/class.test.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { expect, it, describe, beforeEach, vi, afterEach } from 'vitest';
|
|
2
|
-
import { getExampleDOM } from './fixtures/getExampleDom';
|
|
3
|
-
import * as SHORTY from '../src/index';
|
|
4
|
-
import "./fixtures/style.css";
|
|
5
|
-
|
|
6
|
-
describe('Shorty Library Tests - CLASS', () => {
|
|
7
|
-
const wrapper = document.createElement('div');
|
|
8
|
-
document.body.append(wrapper);
|
|
9
|
-
afterEach(async () => {
|
|
10
|
-
wrapper.innerHTML = '';
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('Test class folder', () => {
|
|
14
|
-
const { addClass, hasClass, removeClass, querySelector } = SHORTY;
|
|
15
|
-
const container = getExampleDOM();
|
|
16
|
-
wrapper.append(container);
|
|
17
|
-
|
|
18
|
-
const alert = querySelector('.alert', container);
|
|
19
|
-
if (!alert) return;
|
|
20
|
-
|
|
21
|
-
addClass(alert, 'to-be-removed');
|
|
22
|
-
expect(hasClass(alert, 'to-be-removed')).to.be.true;
|
|
23
|
-
removeClass(alert, 'show');
|
|
24
|
-
expect(hasClass(alert, 'show')).to.be.false;
|
|
25
|
-
});
|
|
26
|
-
});
|
package/test/event.test.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { expect, it, describe, afterEach, beforeEach, vi } from 'vitest';
|
|
2
|
-
import { getExampleDOM } from './fixtures/getExampleDom';
|
|
3
|
-
import * as SHORTY from '../src/index';
|
|
4
|
-
import "./fixtures/style.css";
|
|
5
|
-
|
|
6
|
-
describe('Shorty Library Tests - EVENT', () => {
|
|
7
|
-
const wrapper = document.createElement('div');
|
|
8
|
-
document.body.append(wrapper);
|
|
9
|
-
afterEach(async () => {
|
|
10
|
-
wrapper.innerHTML = '';
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('Test event folder', () => {
|
|
14
|
-
const {
|
|
15
|
-
// on, off are called by one
|
|
16
|
-
one,
|
|
17
|
-
querySelector,
|
|
18
|
-
} = SHORTY;
|
|
19
|
-
const container = getExampleDOM();
|
|
20
|
-
wrapper.append(container);
|
|
21
|
-
|
|
22
|
-
const el = querySelector('.alert', container);
|
|
23
|
-
const btn = querySelector('button', container);
|
|
24
|
-
|
|
25
|
-
if (!el || !btn) return;
|
|
26
|
-
|
|
27
|
-
one(el, 'click', function handle(e) {
|
|
28
|
-
el.innerText += 'click fired for ' + (e.currentTarget as HTMLElement).tagName;
|
|
29
|
-
expect(el.innerText).toContain('click fired for DIV')
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
one(btn, 'click', function handle(e) {
|
|
34
|
-
el.innerText += 'click fired for ' + (e.target as HTMLElement).tagName;
|
|
35
|
-
expect(el.innerText).toContain('click fired for BUTTON')
|
|
36
|
-
});
|
|
37
|
-
btn.click();
|
|
38
|
-
});
|
|
39
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const CEP = document.createElement('p');
|
|
2
|
-
CEP.innerText = 'Sample Custom Element';
|
|
3
|
-
|
|
4
|
-
export default class CustomElem extends HTMLElement {
|
|
5
|
-
constructor() {
|
|
6
|
-
super();
|
|
7
|
-
|
|
8
|
-
this.attachShadow({ mode: 'open' });
|
|
9
|
-
}
|
|
10
|
-
connectedCallback() {
|
|
11
|
-
this.shadowRoot.append(CEP);
|
|
12
|
-
}
|
|
13
|
-
disconnectedCallback() {
|
|
14
|
-
this.shadowRoot.innerHTML = '';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
customElements.define('custom-elem', CustomElem);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
const markup = `<div class="p-5">
|
|
2
|
-
<div id="alertDemo" class="alert alert-warning alert-dismissible fade show" data-bs-op1="false" data-bs-op2="true" data-bs-op3="10" data-bs-title="" role="alert">
|
|
3
|
-
<button role="button" type="button" class="btn-close bg-none" data-bs-target="alertDemo" data-bs-dismiss="alert" aria-label="Close">
|
|
4
|
-
<svg viewBox="0 0 16 16" class="align-top">
|
|
5
|
-
<title>Delete</title>
|
|
6
|
-
<path name="x" d="M4.646 4.646a0.5 0.5 0 0 1 0.708 0L8 7.293l2.646 -2.647a0.5 0.5 0 0 1 0.708 0.708L8.707 8l2.647 2.646a0.5 0.5 0 0 1 -0.708 0.708L8 8.707l-2.646 2.647A0.5 0.5 0 0 1 4.646 10.646L7.293 8L4.646 5.354a0.5 0.5 0 0 1 0 -0.708z"></path>
|
|
7
|
-
</svg>
|
|
8
|
-
</button>
|
|
9
|
-
<p><b>Holy guacamole!</b> Best check yo self, you're not looking too good.</p>
|
|
10
|
-
<button class="btn btn-outline-secondary">
|
|
11
|
-
ReadMore
|
|
12
|
-
</button>
|
|
13
|
-
|
|
14
|
-
<img src="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgODAgNDMiIHdpZHRoPSI4MCIgaGVpZ2h0PSI0MyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgICAgICAgICAgICAgICAgIDxyZWN0IGZpbGw9IndoaXRlIiBzdHJva2U9IiNjY2MiIHN0cm9rZS13aWR0aD0iMSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgcng9IjUiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgIDx0ZXh0IGRpcmVjdGlvbj0ibHRyIiBmaWxsPSIjMzMzIiB4PSIyNSIgeT0iMjUiIGZvbnQtc2l6ZT0iMTQiPklNRzwvdGV4dD4NCiAgICAgICAgICAgICAgICA8L3N2Zz4=" alt="Image">
|
|
15
|
-
</div>
|
|
16
|
-
<table class="table">
|
|
17
|
-
<thead>
|
|
18
|
-
<tr>
|
|
19
|
-
<th>Event Type</th>
|
|
20
|
-
<th>Description</th>
|
|
21
|
-
</tr>
|
|
22
|
-
</thead>
|
|
23
|
-
<tbody>
|
|
24
|
-
<tr>
|
|
25
|
-
<td><code>show.bs.tooltip</code></td>
|
|
26
|
-
<td>This event fires immediately when the <code>show</code> instance method is called.<br>
|
|
27
|
-
<b>This event can be default prevented.</b></td>
|
|
28
|
-
</tr>
|
|
29
|
-
<tr>
|
|
30
|
-
<td><code>shown.bs.tooltip</code></td>
|
|
31
|
-
<td>This event is fired when the tooltip has been made visible to the user.</td>
|
|
32
|
-
</tr>
|
|
33
|
-
<tr>
|
|
34
|
-
<td><code>hide.bs.tooltip</code></td>
|
|
35
|
-
<td>This event is fired immediately when the <code>hide</code> instance method has been called.<br>
|
|
36
|
-
<b>This event can be default prevented.</b></td>
|
|
37
|
-
</tr>
|
|
38
|
-
<tr>
|
|
39
|
-
<td><code>hidden.bs.tooltip</code></td>
|
|
40
|
-
<td>This event is fired when the tooltip has finished being hidden from the user.</td>
|
|
41
|
-
</tr>
|
|
42
|
-
</tbody>
|
|
43
|
-
</table>
|
|
44
|
-
</div>
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
export const getExampleDOM = () => {
|
|
48
|
-
const tempDocument = new DOMParser().parseFromString(markup, 'text/html');
|
|
49
|
-
const container = tempDocument.body.querySelector('div')!;
|
|
50
|
-
|
|
51
|
-
return container;
|
|
52
|
-
};
|