I have an issue trying to load a fragment inside a div control using some fairly simple code.
I have a div element declared used to house my html fragment (which will eventually hold more complex page logic) but for now it is some extremely simple markup.
I can get a reference to the control correctly via the = u.id('contentHost'); command below, but upon trying to render the contents of that fragment i get the following error :
Object doesn't support property or method 'appendChild'
I've looked at the debugger and found it is loading the fragment correctly by examining its properties, but it's unable to set it inside the div element.
Any ideas?
WinJS.UI.Pages.define("/pages/reportDetail/reportDetail.html", {
ready: function (element, options) {
WinJS.UI.processAll().then(function (e) {
var u = WinJS.Utilities;
var myDiv = u.id('contentHost');
WinJS.UI.Pages.render("/pages/DynamicReportControls/Main/main.html", myDiv, { data: 'data2share' });
}).done();
},
updateLayout: function (element, viewState, lastViewState) {
},
unload: function () {
}
});