I need to do two things in order to use the “Leaflet” library (with Greg Dove’s code):
(a) I need to be able to say, “Implements IProjection,” without the following snippet of JS code being generated:
OurProjection.__interfaces__ = [leaflet.geo.projection.IProjection];
… not only because there’s no “Leaflet” variable (haven’t figured out how to get rid of that one yet), but also because the Leaflet.js library never actually defines “an interface” anywhere in its source-code.
(b) Most importantly, I need to be able to “extend” an object which does not have a “new()” method in the JavaScript. I read about a @:selfCall
pragma, and indeed I find that my haxe (3.1.3) seems to accept it. (It doesn’t throw a compile-error …) But the apparently-mandatory super()
call still tries to call a non-existent new()
. (It even inserts a parameter to that phantom call.)
What can I do to call this library correctly?