|
|
@@ -195,6 +195,18 @@ function _visitNode(node, callback) {
|
|
195
|
195
|
};
|
|
196
|
196
|
}
|
|
197
|
197
|
|
|
|
198
|
+ // Element.remove
|
|
|
199
|
+ //
|
|
|
200
|
+ // Required by:
|
|
|
201
|
+ // - lib-jitsi-meet ChatRoom#onPresence parsing
|
|
|
202
|
+ if (typeof elementPrototype.remove === 'undefined') {
|
|
|
203
|
+ elementPrototype.remove = function() {
|
|
|
204
|
+ if (this.parentNode !== null) {
|
|
|
205
|
+ this.parentNode.removeChild(this);
|
|
|
206
|
+ }
|
|
|
207
|
+ };
|
|
|
208
|
+ }
|
|
|
209
|
+
|
|
198
|
210
|
// Element.innerHTML
|
|
199
|
211
|
//
|
|
200
|
212
|
// Required by:
|
|
|
@@ -231,6 +243,31 @@ function _visitNode(node, callback) {
|
|
231
|
243
|
}
|
|
232
|
244
|
});
|
|
233
|
245
|
}
|
|
|
246
|
+
|
|
|
247
|
+ // Element.children
|
|
|
248
|
+ //
|
|
|
249
|
+ // Required by:
|
|
|
250
|
+ // - lib-jitsi-meet ChatRoom#onPresence parsing
|
|
|
251
|
+ if (!elementPrototype.hasOwnProperty('children')) {
|
|
|
252
|
+ Object.defineProperty(elementPrototype, 'children', {
|
|
|
253
|
+ get() {
|
|
|
254
|
+ const nodes = this.childNodes;
|
|
|
255
|
+ const children = [];
|
|
|
256
|
+ let i = 0;
|
|
|
257
|
+ let node = nodes[i];
|
|
|
258
|
+
|
|
|
259
|
+ while (node) {
|
|
|
260
|
+ if (node.nodeType === 1) {
|
|
|
261
|
+ children.push(node);
|
|
|
262
|
+ }
|
|
|
263
|
+ i += 1;
|
|
|
264
|
+ node = nodes[i];
|
|
|
265
|
+ }
|
|
|
266
|
+
|
|
|
267
|
+ return children;
|
|
|
268
|
+ }
|
|
|
269
|
+ });
|
|
|
270
|
+ }
|
|
234
|
271
|
}
|
|
235
|
272
|
|
|
236
|
273
|
// FIXME There is a weird infinite loop related to console.log and
|