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