# all files / ol/ imageloadfunction.js

100% Statements 2/2
100% Branches 0/0
100% Functions 0/0
100% Lines 2/2

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    221×

    1×
     goog.provide('ol.ImageLoadFunctionType');

    /**
     * A function that takes an {@link ol.Image} for the image and a `{string}` for
     * the src as arguments. It is supposed to make it so the underlying image
     * {@link ol.Image#getImage} is assigned the content specified by the src. If
     * not specified, the default is
     *
     *     function(image, src) {
     *       image.getImage().src = src;
     *     }
     *
     * Providing a custom `imageLoadFunction` can be useful to load images with
     * post requests or - in general - through XHR requests, where the src of the
     * image element would be set to a data URI when the content is loaded.
     *
     * @typedef {function(ol.Image, string)}
     * @api
     */
    ol.ImageLoadFunctionType;