11.2.23 • Published 3 years ago

@upradata/browser-util v11.2.23

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

11.2.23

3 years ago

11.2.20

3 years ago

11.2.19

3 years ago

11.2.18

4 years ago

11.2.17

4 years ago

11.2.16

4 years ago

11.2.5

4 years ago

11.1.3

4 years ago

11.1.10

4 years ago

11.1.2

4 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago