@@ -1,40 +0,0 @@
1−
2−ElmRuntime.Render.Utils = function() {
3− 'use strict';
4−
5− function htmlSize(txt, width) {
6− var t = document.createElement('div');
7− t.innerHTML = html;
8− t.style.width = w + "px";
9−
10− t.style.visibility = "hidden";
11− t.style.styleFloat = "left";
12− t.style.cssFloat = "left";
13−
14− document.body.appendChild(t);
15− var cStyle = window.getComputedStyle(t,null);
16− var realW = cStyle.getPropertyValue("width").slice(0,-2) - 0;
17− var realH = cStyle.getPropertyValue("height").slice(0,-2) - 0;
18− document.body.removeChild(t);
19− //delete t;
20− return { width: realW|0, height: realH|0 };
21− }
22−
23− // This should not be useful, right?
24− function nodeSize(e) {
25− var t = e.cloneNode(true);
26−
27− t.style.visibility = "hidden";
28− t.style.styleFloat = "left";
29− t.style.cssFloat = "left";
30−
31− document.body.appendChild(t);
32− var w = t.offsetWidth;
33− var h = t.offsetHeight;
34− document.body.removeChild(t);
35− //delete t;
36− return [w,h];
37− }
38−
39− return { htmlSize: htmlSize };
40−}();