How to create custom providers

Containers supply the behavior and providers supply the content. Every container is linked to exactly one provider and its task is to insert content into the container. In this example we create a custom provider that loads random 300x300 images from Lorem Picsum.

adk.container.addProvider('my-provider', {
    load: function({ elem }) {
        elem.innerHTML = '<img src="">'
    unload: function({ elem }) {
        // do cleanup stuff

    .addContainer('my-container', adk.container.config()