aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Utils.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-04-26 06:14:07 +0300
committerRblSb <msrblsb@gmail.com>2020-04-26 11:00:30 +0300
commite0f2520fb03ed07a38e96c012c0f599b2fbe7f04 (patch)
tree3b990453720b8193350ab5557abd410119160dd6 /src/client/Utils.hx
parent3c5fda212a8b895027c3853d9979b12a8f6c5798 (diff)
Fix autoscroll with unloaded images
Diffstat (limited to 'src/client/Utils.hx')
-rw-r--r--src/client/Utils.hx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/Utils.hx b/src/client/Utils.hx
index 3ac9953..e9d5ff8 100644
--- a/src/client/Utils.hx
+++ b/src/client/Utils.hx
@@ -10,6 +10,12 @@ class Utils {
return js.Syntax.code("'ontouchstart' in window");
}
+ public static function nodeFromString(div:String):Element {
+ final wrapper = document.createDivElement();
+ wrapper.innerHTML = div;
+ return wrapper.firstElementChild;
+ }
+
public static function prepend(parent:Element, child:Element):Void {
if (parent.firstChild == null) parent.appendChild(child);
else parent.insertBefore(child, parent.firstChild);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage