forked from sysapps/app-management
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.htm
876 lines (845 loc) · 32.8 KB
/
index.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
Application Management API
</title>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common' class='remove'
async></script>
<script class='remove'>
var respecConfig = {
specStatus: "unofficial",
shortName: "appman",
//publishDate: "2012-12-12",
previousPublishDate: "TBD",
previousMaturity: "ED",
edDraftURI: "http://www.w3.org/2012/sysapps/appman/",
// lcEnd: "3000-01-01",
// crEnd: "3000-01-01",
editors: [
{ name: "Claes Nilsson", url: "[email protected]",
company: "Sony Mobile", companyURL: "http://www.sonymobile.com" },
],
inlineCSS: true,
noIDLIn: true,
noLegacyStyle: false,
extraCSS: ["../ReSpec.js/css/respec.css"],
wg: "System Applications Working Group",
wgURI: "http://www.w3.org/2012/sysapps/",
wgPublicList: "public-sysapps",
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/58119/status",
otherLinks: [{
key: "Repository",
data: [{
value: "We are on Github.",
href: "https://github.com/sysapps/app-management/"
}, {
value: "File a bug.",
href: "https://github.com/sysapps/app-management/issues"
}, {
value: "Commit history.",
href: "https://github.com/sysapps/app-management/commits/gh-pages"
}
]
}]
};
</script>
<style>
.todo { display: none; }
</style>
</head>
<!-----------------------------------------------------------------------------
Style guide to contributors:
============================
- this document uses ReSpec, see
http://dev.w3.org/2009/dap/ReSpec.js/documentation.html
- use 80 characters wide lines, whenever possible (except long links)
- keep sections 2 empty lines apart
- put comments in front of sections, for better readability with syntax coloring
editors
- use indentation with care: it may improve readability, but at the expense of
line lenght
- when descriptions of attributes is short, use the <dd> elements even when
the text also contains conformance statements (e.g. MUST, SHOULD, MAY).
No use repeating the same information in a separate paragraph.
------------------------------------------------------------------------------>
<body>
<!------------------------------ Abstract ------------------------------------>
<section id='abstract'>
This specification defines an Application Management API that for
example exposes methods for installing and uninstalling applications and
methods for launching and terminating applications. Typical use cases for
this API are web based home screens (application dashboards) and web
based application market places/applications portals.
<div class="note">
<p>
Note that this specification is an unofficial draft and that the
W3C System Applications WG at this moment is not taking up this work.
</p>
</div>
<div class="note">
<p>
This specification should be rewritten to use promises,
(<dfn id="promise"><code><a href="http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects">Promise</a></code></dfn>)
instead of DOMRequest.
</p>
</div>
</section>
<!----------------------------- Introduction --------------------------------->
<section class="informative">
<h2>Introduction</h2>
<h3>Use cases</h3>
<p>
Mobile platforms have applications that are market places, which allows
users to find applications and install them. Examples are Google Play
and iOS App Store. For a certain platform several market places can
exist, for example Amazon Appstore for Android and Nokia Android app
store.
</p>
<p>
In a web app eco-system application market places can be provided as web
applications and these market place applications must therefore have
access to an Application Management API that for example can be used to
install applications as well as to list applications that are
already installed from this application provider.
</p>
<p>
Other use cases for a web Application Management API are web based
home screens/application dashboards. In a web execution environment
the "home screen" can be implemented as a web application and it is
also possible to provide several alternative home screens through
web applications. In this context an Application Management API must
be used to find a list of installed apps and their icons, launch apps,
handle application events etc.
</p>
<h3>Summary of the functionality of this API</h3>
<ul>
<li> Install and uninstall applications
<li> List all installed applications
<li> Check if a certain application is installed
<li> Replace an application instance with a newer version
<li> Launch applications
<li> Hide an application from the user
<li> Terminate applications
<li> Receive events for application install, uninstall, launch, pause, resume and terminate
</ul>
</section>
<!---------------------------- Conformance ----------------------------------->
<section id="conformance">
<p>This specification defines conformance criteria that apply to a single
product: the <dfn>user agent</dfn> that implements the interfaces that
it contains.
</p>
<p>Implementations that use ECMAScript to implement the APIs defined in this
specification MUST implement them in a manner consistent with the ECMAScript
Bindings defined in the Web IDL specification [[!WEBIDL]], as this
specification uses that specification and terminology.
</p>
</section>
<!----------------------------- Terminology ---------------------------------->
<section>
<h2>Terminology</h2>
<p>The <code><a href="http://dev.w3.org/html5/spec/webappapis.html#eventhandler">
EventHandler</a></code> interface represents a callback used for event handlers
as defined in [[!HTML5]].
</p>
<p>The concepts <dfn><a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">
queue a task</a></dfn> and <dfn><a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">
fire an event</a></dfn> are defined in [[!HTML5]].
</p>
<p>The terms <dfn><a href="http://dev.w3.org/html5/spec/webappapis.html#event-handlers">
event handler</a></dfn> and <dfn><a href="http://dev.w3.org/html5/spec/webappapis.html#event-handler-event-type">
event handler event types</a></dfn> are defined in [[!HTML5]].
</p>
</section>
<!------------------------ Security and privacy ------------------------------>
<section>
<h2>Security and privacy considerations</h2>
<p>
This API must be only exposed to trusted content.
</p>
</section>
<!------------------------ Interface Application ------------------------------>
<section>
<h2>
Application Management
</h2>
<section>
<h2>
<a>Application</a> interface
</h2>
<section>
<p>
Web Applications are represented by the <a>Application</a>
interface.
</p>
<dl title='interface Application' class='idl'>
<dt>
readonly attribute DOMString origin
</dt>
<dd>
The attribute MUST return the <a>application's origin</a>.
</dd>
<dt>
readonly attribute Object manifest
</dt>
<dd>
The attribute MUST return an object representing the parsed
<a>application manifest</a>.
</dd>
<dt>
readonly attribute DOMString installOrigin
</dt>
<dd>
The attribute MUST return the origin of the page from which the
application was installed. [[!ORIGIN]]
</dd>
<dt>
readonly attribute unsigned long installTime
</dt>
<dd>
The attribute MUST return the time in milliseconds since epoch at
which the application was installed.
</dd>
<dt>
readonly attribute Object parameters
</dt>
<dd>
The attribute MUST return the parameters that were provided at
install time. See <code>install()</code> in
<a>ApplicationRegistry</a>.
</dd>
<dt>
<a>DOMRequest</a> launch()
</dt>
<dd>
This method MUST return a <a>DOMRequest</a> instance and then run
the following steps asynchronously:
<ol>
<li>If the caller is not allowed by the UA to launch the
application, the UA MUST fire an <code>error</code> event to
the <a>DOMRequest</a> object with the
<code>"NotAllowedError"</code> error code and exit those steps.
</li>
<li>If the caller is allowed to launch the application, the UA
SHOULD launch the application.
</li>
<li>If the application has been successfully launched, the UA
MUST fire a <code>success</code> event to the <a>DOMRequest</a>
object and set <code>result</code> to null.<br>
Otherwise, the UA MUST fire an <code>error</code> event to
the <a>DOMRequest</a> object with an error code that
describes the error.
</li>
</ol>
</dd>
<dt>
<a>DOMRequest</a> uninstall()
</dt>
<dd>
This method MUST return a <a>DOMRequest</a> instance and then run
the following steps asynchronously:
<ol>
<li>If the application is not currently installed, the UA MUST
fire an <code>error</code> event to the <a>DOMRequest</a>
object with the <code>"NotInstalledError"</code> error code and
exit those steps.
</li>
<li>If the caller is not allowed by the UA to uninstall the
application, the UA MUST fire an <code>error</code> event to
the <a>DOMRequest</a> object with the
<code>"NotAllowedError"</code> error code and exit those steps.
</li>
<li>If the caller is allowed to uninstall the application, the
UA SHOULD uninstall the application.
</li>
<li>If the application has been successfully uninstalled, the
UA MUST fire a <code>success</code> event to the
<a>DOMRequest</a> object and set <code>result</code> to
null.<br>
Otherwise, the UA MUST fire an <code>error</code> event to
the <a>DOMRequest</a> object with an error code that
describes the error.
</li>
</ol>
</dd><!-- Update-related API -->
<dt>
readonly attribute DOMString updateState
</dt>
<dd>
The attribute MUST return the empty string,
<code>available</code>, <code>downloading</code>,
<code>downloaded</code> or <code>installing</code>, depending on
the state of the application.<br>
If the application is being updated, the attribute MUST return
<code>installing</code>.<br>
If the application is ready to be updated, with the update fully
downloaded or if there is no download to proceed to the update,
the attribute MUST return <code>downloaded</code>.<br>
If the application's update is being downloaded, the attribute
MUST return <code>downloading</code>.<br>
If there is an application update available, it is not being
installed, nor downloaded, nor downloading, the attribute MUST
return <code>available</code>. Otherwise, the attribute MUST
return the empty string.
</dd>
<dt>
readonly attribute unsigned long downloadSize
</dt>
<dd>
The attribute SHOULD return the size of the download that would
be required to update the application in kilobytes, if any. If
the application does not have an available update, if the
download has already been done or if the UA can't find out the
size of the download required for the update, the attribute MUST
return 0.<br>
If the download is happening, the attribute MUST return 0.<br>
If the download has been made but interrupted and the UA is able
to continue it, the attribute SHOULD return the remaining size to
download.
</dd>
<dt>
DownloadRequest downloadUpdate()
</dt>
<dd>
The method MUST return a <a>DownloadRequest</a> object and
asynchronously run the following steps:
<ol>
<li>If the application does not have an available update, the
UA MUST send an <a>error message</a> to the request object with
the value <code>InvalidState</code> and abort these steps.
</li>
<li>If the application does not require a download to process
the update, the UA MUST send a <a>success message</a> to the
request object with no value and abort these steps.
</li>
<li>If the application's update is currently being downloaded,
the request MUST reflect the current state of the download.
Otherwise, the request must <a>start the download</a>.
</li>
</ol>
</dd><!-- Execution states related API -->
<dt>
readonly attribute DOMString state;
</dt>
<dd>
The attribute MUST return <code>running</code> if the current
application state is <a>running</a>. Otherwise, if the current
application state is <a>paused</a>, it MUST return
<code>paused</code>. Otherwise, it MUST return
<code>terminated</code>.
</dd>
<dt>
void hide()
</dt>
<dd>
When this method is called, the UA SHOULD hide the application
from the user. Hiding the application SHOULD fire visibility
events as described in [[!PAGE-VISIBILITY]].<br>
If the application was already not visible, this method MUST be a
no-op.
</dd>
<dt>
void exit()
</dt>
<dd>
When this method is called, the UA MUST put the application state
to <a>terminated</a> and fire the appropriate events.<br>
If the application was already in the <a>terminated</a> state,
this method MUST be a no-op.
</dd>
<dt>
attribute EventHandler onlaunch
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
<dt>
attribute EventHandler onpause
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
<dt>
attribute EventHandler onresume
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
<dt>
attribute EventHandler onterminate
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
</dl>
</section>
<p>
The following are the <a>event handlers</a> (and their corresponding
<a>event handler event types</a>) that MUST be supported as
attributes by the <code>Application</code> objects:
</p>
<table class="simple">
<thead>
<tr>
<th>
event handler
</th>
<th>
event handler event type
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<strong><code>onlaunch</code></strong>
</td>
<td>
<code>launch</code>
</td>
</tr>
<tr>
<td>
<strong><code>onpause</code></strong>
</td>
<td>
<code>pause</code>
</td>
</tr>
<tr>
<td>
<strong><code>onresume</code></strong>
</td>
<td>
<code>resume</code>
</td>
</tr>
<tr>
<td>
<strong><code>onterminate</code></strong>
</td>
<td>
<code>terminate</code>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<h2>
<a>DownloadRequest</a> interface
</h2>
<section>
<dl title='interface DownloadRequest : DOMRequest' class='idl'>
<dt>
void cancel()
</dt>
<dd>
This method MUST stops the download and asynchronously send an
<a>error message</a> to itself with the value
<code>UserCancel</code>.
</dd>
<dt>
attribute double progress
</dt>
<dd>
If the current state is <code>error</code> the attribute MUST
return 0.0. Otherwise, if the current state is
<code>success</code>, the attribute MUST return 1.0. Otherwise,
the attribute SHOULD return the current progress of the download
expressed between 0.0 and 1.0.
</dd>
<dt>
attribute EventHandler onprogress
</dt>
<dd class="todo">
TBD
</dd>
</dl>
<p>
When the caller <dfn>start the download</dfn>, the
<a>DownloadRequest</a> SHOULD start downloading the resource.
</p>
<p>
If the resource fails to download, the UA MUST send an <a>error
message</a> to the request.<br>
</p>
<p>
If the resource succeed to download, the UA MUST send a <a>success
message</a> to the request.
</p>
<p>
While the resource is downloading, which means as long as
<code>readyState</code> is <code>pending</code>, the UA SHOULD
regularly <a>fire a simple event</a> named <a>progress</a> on the
object. The UA should note that sending too much events might have
an impact on performance but sending too few of them might impact
the user experience.
</p>
<p>
The following are the <a>event handlers</a> (and their
corresponding <a>event handler event types</a>) that MUST be
supported as attributes by the <code>DOMRequest</code> objects:
</p>
<table class="simple">
<thead>
<tr>
<th>
event handler
</th>
<th>
event handler event type
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<strong><code>onprogress</code></strong>
</td>
<td>
<code>progress</code>
</td>
</tr>
</tbody>
</table>
</section>
</section>
<section>
<h2>
Extension to the <a>Navigator</a> interface
</h2>
<section>
<p>
An <a>ApplicationRegistry</a> instance is exposed on the
<code>Navigator</code> object trough the an <code>app</code>
attribute.
</p>
<dl title='partial interface Navigator' class='idl'>
<dt>
readonly attribute ApplicationRegistry app
</dt>
<dd>
The attribute MUST return an <a>ApplicationRegistry</a> instance.
</dd>
</dl>
</section>
</section>
<section>
<h2>
<a>ApplicationRegistry</a> interface
</h2>
<section>
<p>
The <a>ApplicationRegistry</a> interface allows handling
applications and query there status.
</p>
<dl title='interface ApplicationRegistry' class='idl'>
<dt>
DOMRequest install(in DOMString manifestUrl, [Optional] in Object
parameters)
</dt>
<dd>
This method MUST return a <a>DOMRequest</a> instance and then run
the following steps asynchronously:
<ol>
<li>If the caller is not allowed by the UA to install the
application, the UA MUST fire an <code>error</code> event to
the <a>DOMRequest</a> object with the
<code>"NotAllowedError"</code> error code and exit those steps.
</li>
<li>If the caller is allowed to install the application, the UA
SHOULD install the application as described in the manifest at
<code>manifestUrl</code>.
</li>
<li>If the application has been successfully installed, the UA
MUST fire a <code>success</code> event to the <a>DOMRequest</a>
object and set <code>result</code> to null.<br>
Otherwise, the UA MUST fire an <code>error</code> event to
the <a>DOMRequest</a> object with an error code that
describes the error.
</li>
</ol>
<p>
The UA SHOULD verify at any moment before installing that
<code>manifestUrl</code> points to a valid manifest. If this is
not the case, the UA MUST fire an <code>error</code> event to
the <a>DOMRequest</a> object with the
<code>"InvalidArgumentError"</code> and exit the steps.
</p>
<p>
The UA SHOULD save the <code>parameters</code> if some are
passed so they can later be retrieved by the
<code>parameters</code> attribute on the <a>Application</a>
interface.
</p>
</dd>
<dt>
DOMRequest getSelf()
</dt>
<dd>
The UA SHOULD return a <a>DOMRequest</a> object and
asynchronously check if the current context is an application
context.<br>
When the check is done, the UA SHOULD send a <code>success</code>
event to the <a>DOMRequest</a> object and sets its
<code>result</code> attribute to the <a>Application</a> object
representing the current context or <code>null</code> if the
current context is not an application context.
</dd>
<dt>
DOMRequest getInstalled()
</dt>
<dd>
The UA SHOULD return a <a>DOMRequest</a> object and
asynchronously get all applications that have been installed by
the caller's origin. [[!ORIGIN]]<br>
When those applications are collected, the UA SHOULD send a
<code>success</code> event to the <a>DOMRequest</a> object and
populate its <code>result</code> attribute with an array of
<a>Application</a> objects representing the applications.
</dd>
<dt>
DOMRequest checkInstalled(DOMString manifestURL)
</dt>
<dd>
The UA SHOULD return a <a>DOMRequest</a> object and
asynchronously check if there is an installed application in the
system with a manifest URL matching <i>manifestURL</i>.<br>
After the asynchronous operation is done, the IA SHOULD send a
<code>success</code> event to the <a>DOMRequest</a> object and
populate its <code>result</code> attribute with the boolean value
true if there is an installed application fulfilling the
condition, otherwise <code>result</code> should be set to false.
</dd>
<dt>
attribute ApplicationManagement management
</dt>
<dd>
If the caller is not allowed to manage applications, the UA MUST
return null. Otherwise, it MUST return an
<a>ApplicationManagement</a> object.
<ul class="todo">
<li>Permission check is not clearly defined here. Should it be
better?
</li>
</ul>
</dd>
</dl>
<div class='todo'>
<ul>
<li>checkInstalled() could be synchronous. Seems way more
convenient.
</li>
</ul>
</div>
</section>
</section>
<section>
<h2>
<a>ApplicationManagement</a> interface
</h2>
<section>
<p>
The <a>ApplicationManagement</a> interface allows access to all
applications and is being informed any time an application is being
installed or uninstalled. The intent of this interface is to be
restricted to privileged callers.
</p>
<dl title='interface ApplicationManagement' class='idl'>
<dt class='no-docs'>
DOMRequest getAll()
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
<dt class='no-docs'>
DOMRequest applyUpdate(Application application)
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
<dt class='no-docs'>
attribute EventHandler oninstall
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
<dt class='no-docs'>
attribute EventHandler onuninstall
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
</dl>
<p>
The <code>getAll</code> method SHOULD return a <a>DOMRequest</a>
object and asynchronously get all installed applications.<br>
When those applications are collected, the UA SHOULD send a
<code>success</code> event to the <a>DOMRequest</a> object and
populate its <code>request</code> attribute with an array of
<a>Application</a> objects representing the applications.
</p>
<p>
The <code>applyUpdate</code> method MUST return a <a>DOMRequest</a>
object and perform the following steps asynchronously:
</p>
<ol>
<li>If the application does not have an update or the update is not
fully downloaded, the UA MUST send an <a>error message</a> to the
request with the value <code>InvalidState</code> and abort these
steps.
</li>
<li>Stop <i>application</i> from running if it is currently
running.
</li>
<li>Replace the previous version with the new version of the
application.
</li>
<li>If an error has occurred during the previous steps, the UA MUST
send an <a>error message</a> to the request with any appropriate
value. Otherwise, the UA MUST send a <a>success message</a> to the
request with an <a>Application</a> object representing the updated
application as a value.
</li>
</ol>
</section>
<section>
<h2>
Events
</h2>
<p>
An <a>install</a> event using the <a>ApplicationEvent</a> interface
MUST be fired on all <a>ApplicationManagement</a> instances as soon
as an application is installed with the <code>application</code>
attribute set to the <a>Application</a> object representing the
installed application.
</p>
<p>
The <a>uninstall</a> event using the <a>ApplicationEvent</a>
interface MUST be fired on all <a>ApplicationManagement</a>
instances as soon as an application is uninstalled with the
<code>application</code> attribute set to the <a>Application</a>
object representing the uninstalled application.
</p>
<p>
The following are the <a>event handlers</a> (and their
corresponding <a>event handler event types</a>) that MUST be
supported as attributes by the <code>ApplicationManagement</code>
object:
</p>
<table class="simple">
<thead>
<tr>
<th>
event handler
</th>
<th>
event handler event type
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<strong><code>oninstall</code></strong>
</td>
<td>
<code>install</code>
</td>
</tr>
<tr>
<td>
<strong><code>onuninstall</code></strong>
</td>
<td>
<code>uninstall</code>
</td>
</tr>
</tbody>
</table>
</section>
</section>
<section>
<h2>
Application Event Types
</h2>
<p>
Application Events are sent when an event happen on the application
level like an application being installed or uninstalled.
</p>
<section>
<dl title=
'[Constructor(DOMString type, ApplicationEventInit eventInitDict)] interface ApplicationEvent : Event'
class='idl'>
<dt>
readonly attribute Application application
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
</dl>
<dl title='dictionary ApplicationEventInit : EventInit' class='idl'>
<dt>
Application application
</dt>
<dd>
<div class="todo">
TBD
</div>
</dd>
</dl>
</section>
<p>
<a>ApplicationEvent</a> objects MUST contain a non-null
<code>application</code> attribute representing the application on
each the action happened.<br>
The application events are always sent asynchronously, do not bubble
and are not cancelable.
</p>
<p>
There are currently two types of Application Events:
</p>
<ul>
<li>
<dfn>install</dfn> is sent when an application is installed.
<code>application</code> MUST represent the installed application.
</li>
<li>
<dfn>uninstall</dfn> is sent when an application is uninstalled.
<code>application</code> MUST represent the uninstalled
application.
</li>
</ul>
</section>
</section>
<section class="appendix">
<h2>
Acknowledgments
</h2>
<p>
TBD.
</p>
</section>
</body>
</html>