Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  7] [ 6]  / answers: 1 / hits: 37199  / 11 Years ago, wed, august 14, 2013, 12:00:00

If I'm calling this function, getting always html2canvas is not defined.



makeScreenshot: function(button)
{
debugger;
html2canvas(document.body, {
Uncaught ReferenceError: html2canvas is not defined
onrendered: function(canvas) {
document.body.appendChild(canvas);
}
});
},


but why? I have a class of it... like in tutorial written about it. Does anyone have a solution?



I suppose I need to include html2canvas here, but I don't know how.



Ext.define(TEST.controller.Desktop, {
extend: Ext.app.Controller,

views: [
desktop.Desktop,
//desktop.TaskBar,
desktop.Toolbar,
desktop.DataprovidersDataView,
configuration.UploadFileWindow
],

refs: [{
ref: viewport,
selector: viewport
}, {

More From » extjs

 Answers
15

Ext doesn't know anything about classes not defined as part of it's class system, you need to include the JS file using a script tag in your html.


[#76366] Monday, August 12, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
savanar

Total Points: 237
Total Questions: 105
Total Answers: 99

Location: Wales
Member since Mon, May 17, 2021
3 Years ago
;