diff --git a/armory/Sources/armory/logicnode/LoadUrlNode.hx b/armory/Sources/armory/logicnode/LoadUrlNode.hx index 7bf885499..f68fe39dd 100644 --- a/armory/Sources/armory/logicnode/LoadUrlNode.hx +++ b/armory/Sources/armory/logicnode/LoadUrlNode.hx @@ -11,6 +11,20 @@ class LoadUrlNode extends LogicNode { } override function run(from: Int) { - System.loadUrl(inputs[1].get()); + //System.loadUrl(inputs[1].get()); + + #if kha_html5 + if (inputs[2].get()){ + var window = inputs[3].get() ? js.Browser.window.open(inputs[1].get(), "_blank", "width="+inputs[4].get()+",height="+inputs[5].get()+",left="+inputs[6].get()+",top="+inputs[7].get()) + : js.Browser.window.open(inputs[1].get(), "_blank"); + + if(window != null) + runOutput(0); + else + runOutput(1); + } + else + js.Browser.window.open(inputs[1].get(), "_self"); + #end } }