Skip to content

The design language that makes your AI harness better at design.

JavaScript
1.6 KB
Raw Blame
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Consent hiding: a nested web-component sign-in form under a banner</title>
  <style>
    /* shadow-form-page.html with the form one component deeper: an app
       shell's open shadow root holds a login component, whose own shadow
       root holds the form. The form is still the page's content outside
       the manager, so the page is scanned, not refused as a consent wall.
       Pinned by crates/browser/tests/consent_hiding.rs. */
    body { font: 16px/1.5 system-ui, sans-serif; margin: 0; background: #fff; }
    #onetrust-pc-sdk { position: fixed; top: 80px; left: 50%; width: 640px; margin-left: -320px; padding: 32px; background: #fff; }
  </style>
</head>
<body>
  <x-app></x-app>
  <div id="onetrust-consent-sdk">
    <div id="onetrust-pc-sdk" role="dialog" aria-label="Privacy preferences">
      <h2>Your privacy choices</h2>
      <p>We and our partners store and access information on your device, such as cookies, and process personal data such as unique identifiers and browsing data, to personalise content and advertising and to measure its performance.</p>
    </div>
  </div>
  <script>
    const app = document.querySelector('x-app').attachShadow({ mode: 'open' });
    app.innerHTML = '<div style="padding:24px"><x-login></x-login></div>';
    const login = app.querySelector('x-login').attachShadow({ mode: 'open' });
    login.innerHTML = '<form style="display:block"><label><input type="email" name="email"></label> <button type="submit"></button></form>';
  </script>
</body>
</html>