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