OLD | NEW |
(Empty) | |
| 1 <h1 class="page_title">Disabled Web Features</h1> |
| 2 <p> |
| 3 Though packaged apps use the web platform, |
| 4 some web features have been disabled |
| 5 or else are used in a different way. |
| 6 Mainly this is to avoid security issues and |
| 7 to improve programming practices. |
| 8 Below is a summary of the disabled features |
| 9 of the web platform |
| 10 and potential work-arounds: |
| 11 </p> |
| 12 <table border="0"> |
| 13 <tr> |
| 14 <th scope="col"> Disabled </th> |
| 15 <th scope="col"> Work-around </th> |
| 16 </tr> |
| 17 <tr> |
| 18 <td><code>alert</code></td> |
| 19 <td>Use a custom lightbox/popup.</td> |
| 20 </tr> |
| 21 <tr> |
| 22 <td>Browser chrome APIs</td> |
| 23 <td>N/A.</td> |
| 24 </tr> |
| 25 <tr> |
| 26 <td><code>confirm</code></td> |
| 27 <td>Use a custom lightbox/popup.</td> |
| 28 </tr> |
| 29 <tr> |
| 30 <td><code>document.cookie</code></td> |
| 31 <td>Packaged app pages are not rendered on the server, so there is no need t
o use these.</td> |
| 32 </tr> |
| 33 <tr> |
| 34 <td><code>document.close</code></td> |
| 35 <td>N/A.</td> |
| 36 </tr> |
| 37 <tr> |
| 38 <td><code>document.open</code></td> |
| 39 <td>N/A.</td> |
| 40 </tr> |
| 41 <tr> |
| 42 <td><code>document.write</code></td> |
| 43 <td>Use document.createElement.</td> |
| 44 </tr> |
| 45 <tr> |
| 46 <td>External resources</td> |
| 47 <td>Use the <code>object</code> tag for iframes |
| 48 See <a href="app_external.html">Embed Content</a>. |
| 49 Video and audio are allowed to have non-local URLs.</td> |
| 50 </tr> |
| 51 <tr> |
| 52 <td>Flash</td> |
| 53 <td>Use HTML5 Platform.</td> |
| 54 </tr> |
| 55 <tr> |
| 56 <td>Form submission</td> |
| 57 <td>Use JavaScript to process form content |
| 58 (listen for submit event, process data locally first |
| 59 before sending to server).</td> |
| 60 </tr> |
| 61 <tr> |
| 62 <td>javascript: urls</td> |
| 63 <td>You cannot use bookmarklets for inline javascript on anchors. |
| 64 Use the traditional click handler instead.</td> |
| 65 </tr> |
| 66 <tr> |
| 67 <td>localStorage</td> |
| 68 <td>Use IndexedDB or the Storage API (which also syncs to the cloud).</td> |
| 69 </tr> |
| 70 <tr> |
| 71 <td>Navigation</td> |
| 72 <td>Links open up with the system web browser. |
| 73 <code>window.history</code> and <code>window.location</code> |
| 74 are disabled.</td> |
| 75 </tr> |
| 76 <tr> |
| 77 <td>Non-sandboxed plugins</td> |
| 78 <td>N/A.</td> |
| 79 </tr> |
| 80 <tr> |
| 81 <td><code>showModalDialog</code></td> |
| 82 <td>Use a custom lightbox/popup.</td> |
| 83 </tr> |
| 84 <tr> |
| 85 <td>Synchronous <code>XMLHttpRequest</code></td> |
| 86 <td>Use async-only <code>XMLHttpRequest</code>: |
| 87 <a href="http://updates.html5rocks.com/2012/01/Getting-Rid-of-Synchronous-
XHRs">Getting Rid of Synchrounous XXRs</a>.</td> |
| 88 </tr> |
| 89 <tr> |
| 90 <td>webSql</td> |
| 91 <td>Use IndexedDB or |
| 92 <a href="app_storage.html">Filesystem API</a>.</td> |
| 93 </tr> |
| 94 </table> |
| 95 <p class="backtotop"><a href="#top">Back to top</a></p> |
OLD | NEW |