Fix -Ddom define (resolve openfl/openfl#2067)

This commit is contained in:
Joshua Granick
2018-11-12 10:00:16 -08:00
parent 2ae6f7a8f0
commit ce28056089

View File

@@ -88,6 +88,11 @@ class HTML5Window {
var attributes = parent.__attributes;
if (!Reflect.hasField (attributes, "context")) attributes.context = {};
#if dom
attributes.context.type = DOM;
attributes.context.version = "";
#end
renderType = attributes.context.type;
if (Reflect.hasField (attributes, "element")) {
@@ -98,11 +103,6 @@ class HTML5Window {
var element = parent.element;
#if dom
attributes.context.type = DOM;
attributes.context.version = "";
#end
if (Reflect.hasField (attributes, "allowHighDPI") && attributes.allowHighDPI && renderType != DOM) {
scale = Browser.window.devicePixelRatio;