webRoot

This property holds the full path to the hybrid app's internal web server

intel.xdk.webRoot

Description:

Use this property to reference files distributed with the bundle of the application itself. For example, images or sounds that are included alongside the index.html file that drives the application. The path returned by this property will reference the root directory where the index.html file is located.

Example:


document.addEventListener("intel.xdk.device.ready",onDeviceReady,false);
function onDeviceReady(evt)
{
        document.getElementsByTagName("body")[0].style.backgroundImage = "url('" + intel.xdk.webRoot + "bodyImage.png')";
}               
                
Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.