package slideview.getImage;
class FactoryGetImage {
static function main() : Void {
new FactoryGetImage();
}
static function new(?idTagContainer : String, ?callback) : Void {
trace(js.html.Document.getElementById('teste'));
}
}
src/slideview/getImage/FactoryGetImage.hx:21: characters 8-39 : js.html.#Document has no field getElementById
var doc = new js.html.Document();
doc.getElementById('teste');
src/slideview/getImage/FactoryGetImage.hx:21: characters 12-34 : js.html.Document does not have a constructor
I put static, performed and...
Compiled!
But, when compiled, the following error appeared in the browser console:
(Firefox 24.0 beta)
TypeError: Document.getElementById is not a function
console.log(Document.getElementById("teste"));
Again, in Document.hx try:
Line 41 @:native("Document")
for
Line 41 @:native("document")
But ... what did I do wrong? I'll have to change all the libraries that I am using?!
Looking at the documentation has realized that 'js.Lib' instead of 'js.html'. Concluded that the documentation is outdated ...
Could anyone help me?
Another doubt. If I want to use my class 'slideview.getImage.FactoryGetImage' other js codes, how do? Example:
<script src="SlideView.js"></script><!-- slideview.getImage.FactoryGetImage.hx compiled to JS -->
<script>
var myObj = new slideview.getImage.FactoryGetImage();
</script>
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.