11.2.23 • Published 2 years ago

@upradata/browser-util v11.2.23

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@upradata/browser-util

Browser Utilities

A bunch of utilities in typescript working on Browser

Look at Node Utilities, for util stuff working only on Node

  • EventWrapperInRaf (wrap an event inside a requestAnimationFrame)
    const elementTarget = window;
    const eventName = 'scroll';
    const newEventName = eventName + 'InRaf';

    const scrollEvent: EventWrapperParam = {
        elementTarget, // this.el.nativeElement,
        source: {
            eventName,
            options: {} as boolean | AddEventListenerOptions
        },
        destination: {
            eventName: newEventName,
            debug: newEventName,
            getDetail: () => ({ ledetaildeouf: 'cool:)' })
        }
    };

    EventWrapperInRaf.create(scrollEvent);

    window.addEventListener(newEventName, event => console.log(event));

    // A cache creating to not create few time the same wrapper.
11.2.21

2 years ago

11.2.23

2 years ago

11.2.20

2 years ago

11.2.19

2 years ago

11.2.18

3 years ago

11.2.17

3 years ago

11.2.16

3 years ago

11.2.5

3 years ago

11.1.3

3 years ago

11.1.10

3 years ago

11.1.2

3 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago