getElementMetrics = function(string, font) {
        var e = document.createElement('div');
        var cvs = document.createElement('canvas');
        var ctx = cvs.getContext('2d');
        var arr, str, w;
        var width = 0;
        var height = 0;
        if (!font) {
            font = enchant.widget._env.font;
        }
        ctx.font = font;
        e.style.font = font;
        string = string || '';
        string = string.replace(/<(br|BR) ?\/?>/g, '<br>');
        arr = string.split('<br>');
        for (var i = 0, l = arr.length; i < l; i++) {
            str = arr[i];
            w = ctx.measureText(str).width;
            if (width < w) {
                width = w;
            }
        }

        e.innerHTML = string;

        if (document.body) {
            document.body.appendChild(e);
            height = parseInt(getComputedStyle(e).height, 10);
            e.style.position = 'absolute';
            width = parseInt(getComputedStyle(e).width, 10);
            document.body.removeChild(e);
        } else {
            height = 14 * arr.length;
        }

        return {
            width: width + 1,
            height: height + 1
        };
    }
Event which will be dispatched when additional content should be loaded for a view.