速記: Javascript@AIR
Wednesday, April 23rd, 2008安全性解釋文件
AIR 是個跨越各種環境的應用程式,看起來很簡單,要處理的事情多很多,目前第一個遇到的問題: sandbox
sandbox 像是程式碼的“活動空間“,基本上處於不同活動空間的程式碼理當無法互相溝通,但是,必要的時候,要想辦法讓他們可以交流, ex:
sandboxBridge
sandboxRoot, documentRoot…
有關在AIR使用Javascript有一個先天上的限制,
官方手冊提到:
Loading script files from outside the application sandbox is not permitted. No security error is generated. All script files that run in the application sandbox must be installed in the application directory. To use external scripts in a page, you must map the page to a different sandbox.
想利用js作為mash-up的根基,需要許多sandbox溝通和對照的程式碼。
