flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject [FlexJS] Object.setObjectIsEnumerable()
Date Sun, 30 Apr 2017 08:21:57 GMT
As far as I can tell, there’s not platform agnostic way to create properties in objects which
are not enumerable. In Flash you’d use setObjectIsEnumerable() and in JS, you’d use Object.defineProperty().

Using setObjectIsEnumerable() in AS3 code and cross-compiling keeps the call as-is and generates
a runtime error.

There seem to be two ways to resolve this problem that I can think of:
1. Falcon can rewrite any setObjectIsEnumerable() calls to use Object.defineProperty() on
the JS side.
2. We can add a Util class to add non-enumerable properties which has conditional compilation.

#1 should be more efficient at runtime, but is probably more work to implement.


View raw message