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

Side by Side Diff: include.preload.js

Issue 29349787: Issue 4191 - Fix typo in shadowRoot descriptor (Closed)
Patch Set: Created Aug. 12, 2016, 12:31 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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // Stop the website from messing with our shadowRoot 467 // Stop the website from messing with our shadowRoot
468 if ("shadowRoot" in Element.prototype) 468 if ("shadowRoot" in Element.prototype)
469 { 469 {
470 runInDocument(document, function() 470 runInDocument(document, function()
471 { 471 {
472 var ourShadowRoot = document.documentElement.shadowRoot; 472 var ourShadowRoot = document.documentElement.shadowRoot;
473 var desc = Object.getOwnPropertyDescriptor(Element.prototype, "shadowRoo t"); 473 var desc = Object.getOwnPropertyDescriptor(Element.prototype, "shadowRoo t");
474 var shadowRoot = Function.prototype.call.bind(desc.get); 474 var shadowRoot = Function.prototype.call.bind(desc.get);
475 475
476 Object.defineProperty(Element.prototype, "shadowRoot", { 476 Object.defineProperty(Element.prototype, "shadowRoot", {
477 conifgurable: true, enumerable: true, get: function() 477 configurable: true, enumerable: true, get: function()
478 { 478 {
479 var shadow = shadowRoot(this); 479 var shadow = shadowRoot(this);
480 return shadow == ourShadowRoot ? null : shadow; 480 return shadow == ourShadowRoot ? null : shadow;
481 } 481 }
482 }); 482 });
483 }, null); 483 }, null);
484 } 484 }
485 } 485 }
486 486
487 function addElemHideSelectors(selectors) 487 function addElemHideSelectors(selectors)
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 }, true); 610 }, true);
611 611
612 return updateStylesheet; 612 return updateStylesheet;
613 } 613 }
614 614
615 if (document instanceof HTMLDocument) 615 if (document instanceof HTMLDocument)
616 { 616 {
617 checkSitekey(); 617 checkSitekey();
618 window.updateStylesheet = init(document); 618 window.updateStylesheet = init(document);
619 } 619 }
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