Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/content/elemHideEmulation.js

Issue 29738586: Noissue - Access document via this (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created March 31, 2018, 2:10 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 this._scheduledProcessing = null; 753 this._scheduledProcessing = null;
754 this._addSelectors(params.stylesheets, params.mutations, completion); 754 this._addSelectors(params.stylesheets, params.mutations, completion);
755 }, 755 },
756 MIN_INVOCATION_INTERVAL - (performance.now() - this._lastInvocation)); 756 MIN_INVOCATION_INTERVAL - (performance.now() - this._lastInvocation));
757 } 757 }
758 else if (this.document.readyState == "loading") 758 else if (this.document.readyState == "loading")
759 { 759 {
760 this._scheduledProcessing = {stylesheets, mutations}; 760 this._scheduledProcessing = {stylesheets, mutations};
761 let handler = () => 761 let handler = () =>
762 { 762 {
763 document.removeEventListener("DOMContentLoaded", handler); 763 this.document.removeEventListener("DOMContentLoaded", handler);
764 let params = Object.assign({}, this._scheduledProcessing); 764 let params = Object.assign({}, this._scheduledProcessing);
765 this._filteringInProgress = true; 765 this._filteringInProgress = true;
766 this._scheduledProcessing = null; 766 this._scheduledProcessing = null;
767 this._addSelectors(params.stylesheets, params.mutations, completion); 767 this._addSelectors(params.stylesheets, params.mutations, completion);
768 }; 768 };
769 document.addEventListener("DOMContentLoaded", handler); 769 this.document.addEventListener("DOMContentLoaded", handler);
770 } 770 }
771 else 771 else
772 { 772 {
773 this._filteringInProgress = true; 773 this._filteringInProgress = true;
774 this._addSelectors(stylesheets, mutations, completion); 774 this._addSelectors(stylesheets, mutations, completion);
775 } 775 }
776 }, 776 },
777 777
778 onLoad(event) 778 onLoad(event)
779 { 779 {
(...skipping 28 matching lines...) Expand all
808 characterData: shouldObserveCharacterData(this.patterns), 808 characterData: shouldObserveCharacterData(this.patterns),
809 subtree: true 809 subtree: true
810 } 810 }
811 ); 811 );
812 this.document.addEventListener("load", this.onLoad.bind(this), true); 812 this.document.addEventListener("load", this.onLoad.bind(this), true);
813 } 813 }
814 } 814 }
815 }; 815 };
816 816
817 exports.ElemHideEmulation = ElemHideEmulation; 817 exports.ElemHideEmulation = ElemHideEmulation;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld