Skip to content

Commit faf5af8

Browse files
author
Dan Lasky
committed
normalize event prefixing with sync
1 parent 74f89c8 commit faf5af8

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/shared/js/ajax.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,21 +123,21 @@
123123
abort: function() {
124124
if (this.current) {
125125
this.current.abort();
126-
this.fire("abort", {instance:this});
126+
this.fire("abort", {instance:this}, {prefix:true});
127127
}
128128
},
129129

130130
abortQueue: function(queueName) {
131131
_getQueue(queueName).running.abort();
132-
this.fire("abort-queue", {instance:this});
132+
this.fire("abort-queue", {instance:this}, {prefix:true});
133133
},
134134

135135
handleProgress: function(e) {
136136
this.fire("progress", {
137137
percent: e.totalSize/e.position,
138138
total: e.totalSize,
139139
current: e.position
140-
});
140+
}, {prefix:true});
141141
},
142142

143143
addHeader: function(name, value) {
@@ -226,7 +226,7 @@
226226
try {
227227
data = JSON.parse(data);
228228
} catch(e) {
229-
this.fire("error", {error:e, instance:this});
229+
this.fire("error", {error:e, instance:this}, {prefix:true});
230230
}
231231
}
232232
if ( DataUtils.isType(data, "array") ) {
@@ -249,6 +249,7 @@
249249
type = this._eventPrefix + type;
250250
}
251251
if (this.is) {
252+
//Polymer
252253
Polymer.Base.fire.call(this, type, detail, options);
253254
} else {
254255
//JS Object

0 commit comments

Comments
 (0)