parent-mask.tentative.html (1332B)
1 <!doctype html> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <title>Geolocation Element: invalid if parent has mask</title> 6 <link 7 rel="help" 8 href="https://github.com/WICG/PEPC/blob/main/explainer.md#locking-the-pepc-style" 9 /> 10 <script src="/resources/testharness.js"></script> 11 <script src="/resources/testharnessreport.js"></script> 12 </head> 13 <body> 14 <script> 15 async_test((t) => { 16 const parent = document.createElement("div"); 17 const element = document.createElement("geolocation"); 18 parent.appendChild(element); 19 20 parent.style.mask = "linear-gradient(black, transparent)"; 21 22 element.onvalidationstatuschange = t.step_func(() => { 23 // These two invalid reasons are expected when the geolocation element was just created. 24 if ( 25 element.invalidReason == "unsuccessful_registration" || 26 element.invalidReason == "intersection_changed" 27 ) { 28 return; 29 } 30 assert_equals( 31 element.invalidReason, 32 "style_invalid", 33 `Parent with mask should be invalid`, 34 ); 35 t.done(); 36 }); 37 38 document.body.appendChild(parent); 39 }, "Geolocation element is invalid if it has a parent with a mask."); 40 </script> 41 </body> 42 </html>