2.2.0 • Published 10 years ago

@pod-point/module-loader v2.2.0

Weekly downloads
26
License
MIT
Repository
github
Last release
10 years ago

Module loader

The module loader is used for managing the lifecycle of JavaScript modules on traditional or dynamic-content websites.

Init

import loadModules from '@pod-point/module-loader';

loadModules({
    foo,
    bar
});

Use

Modules:

  • Export init methods.
  • Can optionally export a refresh method, which is called on all persistent modules on subsequent load.
  • Can be initialised once per page.
  • Are maintained between page transitions.

Handling dynamic page transitions

loadModules();

Rerunning loadModules (without arguments) will run through all active persistent modules and fire their refresh method (if present).

2.2.0

10 years ago

2.1.0

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago