OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 /** | 349 /** |
350 * Address being requested | 350 * Address being requested |
351 * @type String | 351 * @type String |
352 */ | 352 */ |
353 location: null, | 353 location: null, |
354 /** | 354 /** |
355 * Filter that was applied to this request (if any) | 355 * Filter that was applied to this request (if any) |
356 * @type Filter | 356 * @type Filter |
357 */ | 357 */ |
358 filter: null, | 358 filter: null, |
359 /** | |
360 * String representation of the content type, e.g. "subdocument" | |
361 * @type String | |
362 */ | |
363 get typeDescr() | |
364 { | |
365 return this.type; | |
366 }, | |
367 | 359 |
368 /** | 360 /** |
369 * Attaches this request object to a DOM node. | 361 * Attaches this request object to a DOM node. |
370 */ | 362 */ |
371 attachToNode: function(/**Node*/ node) | 363 attachToNode: function(/**Node*/ node) |
372 { | 364 { |
373 let existingData = getEntry(nodeData, node); | 365 let existingData = getEntry(nodeData, node); |
374 if (typeof existingData == "undefined") | 366 if (typeof existingData == "undefined") |
375 { | 367 { |
376 existingData = {}; | 368 existingData = {}; |
377 setEntry(nodeData, node, existingData); | 369 setEntry(nodeData, node, existingData); |
378 } | 370 } |
379 | 371 |
380 // Add this request to the node data | 372 // Add this request to the node data |
381 existingData[this.type + " " + this.location] = this; | 373 existingData[this.type + " " + this.location] = this; |
382 } | 374 } |
383 }; | 375 }; |
OLD | NEW |