Changes between Version 5 and Version 6 of Ticket #6847


Ignore:
Timestamp:
08/28/2018 09:06:35 AM (19 months ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6847 – Description

    v5 v6  
    4040 
    4141The filter `#$#hide-if-contains /\\bAd\\b/ div[id]` should hide the "Check this!" ad and not the "The Adventures of Tom Sawyer" content. 
     42 
     43Also try the following test: 
     44 
     45{{{ 
     46<!-- test.html --> 
     47<!-- Content -->  
     48<div> 
     49  Lorem ipsum dolor sit amet, consectetur 
     50  adipiscing elit, sed do eiusmod tempor 
     51  incididunt ut labore et dolore magna aliqua. 
     52</div> 
     53<!-- Ad --> 
     54<div id="qvdqv3k4hxe"> 
     55  <div>Best ad ever!</div> 
     56  <div></div> 
     57</div> 
     58<!-- Advocacy --> 
     59<div id="zc34r93jglg"> 
     60  <div>Support the Open Web</div> 
     61  <div></div> 
     62</div> 
     63<script src="script.js"></script> 
     64}}} 
     65 
     66{{{ 
     67/* script.js */ 
     68setTimeout(() => 
     69{        
     70  let labelElement = 
     71    document.getElementById("qvdqv3k4hxe").lastElementChild; 
     72  let shadowRoot = 
     73    labelElement.attachShadow({mode: "closed"}); 
     74  let span = document.createElement("span"); 
     75  span.innerText = "Ad"; 
     76  shadowRoot.appendChild(span); 
     77 
     78  labelElement = 
     79    document.getElementById("zc34r93jglg").lastElementChild; 
     80  shadowRoot = 
     81    labelElement.attachShadow({mode: "closed"}); 
     82  span = document.createElement("span"); 
     83  span.innerText = "Advocacy"; 
     84  shadowRoot.appendChild(span); 
     85}, 
     86500); 
     87}}} 
     88 
     89The filter `#$#hide-if-shadow-contains /\\bAd\\b/ div[id]` should hide the ad "Best ad ever!" but not the content "Support the Open Web".