attachImageOnLoadHandler(image, image_container) {
        image.onload = () => {
            const msg = document.createElement('p');
            msg.innerText = `Resolution (width x height)\nNative: ${image.naturalWidth} x ${image.naturalHeight}\nShown at: ${image.width} x ${image.height}`;
            image_container.appendChild(msg);
        }
    }
/**
     * Attaches a handler to the given image.  This handler takes care of displaying some additional information
     * about the image when it is loaded.
     *
     * @param {Image} image
     * @param {HTMLDivElement} image_container The widget's interactive container div.
     */
Attaches a handler to the given image.  This handler takes care of displaying some additional information
about the image when it is loaded.

@param {Image} image
@param {HTMLDivElement} image_container The widget's interactive container div.
Attaches a handler to the given image . This handler takes care of displaying some additional information about the image when it is loaded . @param { Image } image @param { HTMLDivElement } image_container The widget ' s interactive container div .
attachImageOnLoadHandler(image, image_container) {
        image.onload = () => {
            const msg = document.createElement('p');
            msg.innerText = `Resolution (width x height)\nNative: ${image.naturalWidth} x ${image.naturalHeight}\nShown at: ${image.width} x ${image.height}`;
            image_container.appendChild(msg);
        }
    }
attachImageOnLoadHandler ( image , image_container ) { image . onload = ( ) => { const msg = document . createElement ( 'p' ) ; msg . innerText = ` \n ${ image . naturalWidth } ${ image . naturalHeight } \n ${ image . width } ${ image . height } ` ; image_container . appendChild ( msg ) ; } }
Attaches a handler to the given image.
Attaches a handler to the given image .