我最近刚刚下载了 TideSDK,但遇到了一些问题。基本上,我想创建一个新窗口,使用外部链接(工作得很好),然后注入一个样式表来修改窗口,就像你可以使用 chrome 扩展一样。
var newWindow = Ti.UI.createWindow({
        id: "newwindow",
        url: "http://www.example.com",
        title: "New Window",
        width: 1100,
        minWidth: 400,
        maxWidth: 1100,
        height: 730,
        minHeight: 500,
        maxHeight: 730,
        maximizable: true,
        minimizable: true,
        closeable: true,
        resizable: true,
        fullscreen: false,
        maximized: false,
        minimized: false,
        usingChrome: true,
        topMost: false,
        visible: true,
        transparentBackground: false,
        transparency: false
    });
newWindow.open();
我一生都无法弄清楚如何做到这一点。我尝试了以下几种变体:
var css = "<link type='text/css' href='app://style.css' />";
newWindow.document.getElementById('body').appendChild();
没有任何东西会附加到新窗口中。事实上,无论我如何测试新窗口似乎都不会被识别为存在。有任何想法吗?