@@ -77,15 +77,15 @@ <h2>Introduction</h2>
77
77
An example of use is provided below:
78
78
79
79
< pre class ="example highlight ">
80
- var req = navigator.messaging.sms.send (
81
- '+1234567890', 'How are you?');
82
-
83
- req.onsuccess = function() {
84
- window.console.log('Message Sent!');
85
- }
86
- req.onerror = function(e) {
87
- window.console.error(e.target.error.name);
88
- }
80
+ var req = navigator.messaging.sms.send (
81
+ '+1234567890', 'How are you?');
82
+
83
+ req.onsuccess = function() {
84
+ window.console.log('Message Sent!');
85
+ }
86
+ req.onerror = function(e) {
87
+ window.console.error(e.target.error.name);
88
+ }
89
89
</ pre >
90
90
</ section >
91
91
@@ -1144,6 +1144,27 @@ <h3>Steps</h3>
1144
1144
</ ol >
1145
1145
</ ol >
1146
1146
1147
+ < p >
1148
+ An example of manual fetch of an MMS is provided below:
1149
+
1150
+ < pre class ="example highlight ">
1151
+ var message = receivedMessageEvent.message
1152
+ if (message.state == 'not-downloaded') {
1153
+ var req = navigator.messaging.mms.fetch (message.id)
1154
+ req.onprogress = function() {
1155
+ window.console.log(e.loaded + ' bytes out of ' + e.total + '
1156
+ downloaded ...');
1157
+ }
1158
+ req.onsuccess = function() {
1159
+ window.console.log('Message Fetched!');
1160
+ }
1161
+ req.onerror = function(e) {
1162
+ window.console.error(e.target.error.name);
1163
+ }
1164
+ }
1165
+ </ pre >
1166
+
1167
+
1147
1168
< p > The User Agent MAY fire additional < code > ProgressEvents</ code >
1148
1169
[[!PROGRESS-EVENTS]] on the < code > MessagingRequest</ code > object associated to
1149
1170
the sending and fetching of an MMS message, in order to report on the progress
@@ -1178,6 +1199,11 @@ <h2><a>MessagingRequest</a> Interface</h2>
1178
1199
< code > MessagingRequest</ code > object, e.g. < code > delete</ code > method of the
1179
1200
< code > Messaging</ code > object.</ dd >
1180
1201
1202
+ < dt class ="no-docs ">
1203
+ attribute EventHandler onprogress
1204
+ </ dt >
1205
+ < dd > </ dd >
1206
+
1181
1207
< dt class ="no-docs ">
1182
1208
attribute EventHandler onsuccess
1183
1209
</ dt >
@@ -1521,7 +1547,7 @@ <h2><a>MessagingCursor</a> Interface</h2>
1521
1547
< h2 > < a > MessagingEvent</ a > Interface</ h2 >
1522
1548
< p > The < a > MessagingEvent</ a > interface represents events related to a message
1523
1549
sent or received.
1524
- < dl title ="[NoInterfaceObject] interface MessagingEvent "
1550
+ < dl title ="[NoInterfaceObject] interface MessagingEvent : ProgressEvent "
1525
1551
class ="idl ">
1526
1552
< dt > readonly attribute (SmsMessage or MmsMessage) message</ dt >
1527
1553
< dd > MUST return the < code > SmsMessage</ code > or < code > MmsMessage</ code >
0 commit comments