Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Unable to select sap.ui.core.HTML-content via $()

$
0
0

Hello everyone,

 

i'm working on a mobile application based on sapui5. Now i need a canvas for drawing graphics (no images).

So i've created a new HTML-Control:

var htmlCanvas = new sap.ui.core.HTML({

    id : "htmlCanvas", // sap.ui.core.ID

    content : "<canvas id=\"myCanvas\" height=\"700\" width=\"700\" style=\"border: solid lightgrey 1px\"></canvas>",

    preferDOM : true, // boolean

    sanitizeContent : false, // boolean

    afterRendering : [ function(oEvent) {} ]

});

and set it within my page.

 

Unfortunately in my controller i can't access/get it with:

var myCanvas = $("#myCanvas");

console.log(myCanvas);

 

Could you please help?

Thanks in advance,

Andreas


Viewing all articles
Browse latest Browse all 8124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>