Skip to content

Commit 44b45c0

Browse files
committed
Changes:
* removed all resize/scroll event listeners in favor of IntersectionObserver, ResizeObserver or the new PositionObserver * update dependencies
1 parent 4518c04 commit 44b45c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2661
-3244
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Build
3535
run: pnpm build
3636

37-
- name: ViTst
37+
- name: ViTest
3838
run: pnpm test
3939

4040
- name: Upload coverage report to coveralls.io...

dist/bootstrap-native.cjs

+174-171
Large diffs are not rendered by default.

dist/bootstrap-native.cjs.map

+1-1
Large diffs are not rendered by default.

dist/bootstrap-native.d.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import PositionObserver$1 from '@thednp/position-observer';
2+
13
export interface BaseOptions {
24
[key: string]: unknown;
35
}
@@ -187,6 +189,7 @@ export declare class Dropdown extends BaseComponent {
187189
open: boolean;
188190
parentElement: HTMLElement;
189191
menu: HTMLElement;
192+
_observer: IntersectionObserver;
190193
/**
191194
* @param target Element or string selector
192195
* @param config the instance options
@@ -233,6 +236,7 @@ export declare class Modal extends BaseComponent {
233236
isStatic: boolean;
234237
hasFade: boolean;
235238
relatedTarget: HTMLElement | null;
239+
_observer: ResizeObserver;
236240
/**
237241
* @param target usually the `.modal` element
238242
* @param config instance options
@@ -340,6 +344,7 @@ export declare class Tooltip extends BaseComponent {
340344
offsetParent?: HTMLElement;
341345
enabled: boolean;
342346
id: string;
347+
_observer: PositionObserver$1;
343348
/**
344349
* @param target the target element
345350
* @param config the instance options
@@ -426,14 +431,16 @@ export declare class ScrollSpy extends BaseComponent {
426431
static getInstance: (element: HTMLElement) => ScrollSpy | null;
427432
options: ScrollSpyOptions;
428433
target: HTMLElement | null;
429-
scrollTarget: HTMLElement | Window;
434+
scrollTarget: HTMLElement;
430435
scrollTop: number;
431436
maxScroll: number;
432437
scrollHeight: number;
433438
activeItem: HTMLElement | null;
434439
items: HTMLElement[];
440+
targets: HTMLElement[];
435441
itemsLength: number;
436442
offsets: number[];
443+
_observer: PositionObserver$1;
437444
/**
438445
* @param target the target element
439446
* @param config the instance options

dist/bootstrap-native.js

+172-169
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bootstrap-native.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)