/* basic.css *//* Your tool should NOT find any issues in this file. */body { margin: 0; padding: 0; font-family: sans-serif; color: #333;}/* basic.css *//* Your tool should NOT find any issues in this file. */body { margin: 0; padding: 0; font-family: sans-serif; color: #333;}/* comprehensive-unsafe.css *//* Feature: Container Queries */@container (min-width: 800px) { .widget { font-size: 1.2rem; }}/* Feature: :has() selector */article:has(h2.special) { border: 2px solid purple;}/* Feature: aspect-ratio */.responsive-video { aspect-ratio: 16 / 9; width: 100%;}/* Feature: position: sticky */nav.main-nav { position: sticky; top: 0; background: #fff;}/* Feature: :focus-visible */a:focus-visible { outline: 3px solid skyblue;}/* comprehensive-unsafe.css *//* Feature: Container Queries *//* fallback for @container */@media (min-width: 800px) { .widget { font-size: 1.2rem; }}/* Feature: :has() selector *//* fallback for :has() */article.has-h2special { border: 2px solid purple;}/* Feature: aspect-ratio */.responsive-video { padding-top: 56.25%; height: 0; position: relative; width: 100%;}/* Feature: position: sticky */nav.main-nav { position: sticky; top: 0; background: #fff;}/* Feature: :focus-visible */a:focus { outline: 3px solid skyblue;}// A complex script that uses multiple non-baseline features together.async function processAndCloneData() { // 1. AbortController is used to set a timeout for our API calls. const controller = new AbortController(); const timeoutId = setTimeout(() => controller.abort(), 800); console.log('Racing two API endpoints...'); try { // 2. Promise.any races two fetch requests. const firstSuccessfulResponse = await Promise.any([ fetch('/api/fast-endpoint', { signal: controller.signal }), fetch('/api/slow-endpoint', { signal: controller.signal }) ]); clearTimeout(timeoutId); // Clear the timeout since a promise succeeded. const originalData = await firstSuccessfulResponse.json(); console.log('Received original data:', originalData); // 3. structuredClone is used to create a true deep copy of the complex data. const clonedData = structuredClone(originalData); clonedData.meta.processed = true; console.log('Successfully cloned and modified data:', clonedData); return clonedData; } catch (error) { if (error instanceof AggregateError) { console.error('Both API calls failed:', error.errors); } else { console.error('An error occurred:', error.name); } }}processAndCloneData();async function processAndCloneData() { const controller = new ManualAbortController(); const timeoutId = setTimeout(() => controller.abort(), 800); console.log('Racing two API endpoints...'); try { const firstSuccessfulResponse = await Promise.any([ fetch('/api/fast-endpoint', { signal: controller.signal }), fetch('/api/slow-endpoint', { signal: controller.signal }) ]); clearTimeout(timeoutId); const originalData = await firstSuccessfulResponse.json(); console.log('Received original data:', originalData); const clonedData = structuredClone(originalData); clonedData.meta.processed = true; console.log('Successfully cloned and modified data:', clonedData); return clonedData; } catch (error) { if (error instanceof AggregateError) { console.error('Both API calls failed:', error.errors); } else { console.error('An error occurred:', error.name); } }}processAndCloneData();// A complex script that uses multiple non-baseline features together.async function processAndCloneData() { // 1. AbortController is used to set a timeout for our API calls. const controller = new AbortController(); const timeoutId = setTimeout(() => controller.abort(), 800); console.log('Racing two API endpoints...'); try { // 2. Promise.any races two fetch requests. const firstSuccessfulResponse = await Promise.any([ fetch('/api/fast-endpoint', { signal: controller.signal }), fetch('/api/slow-endpoint', { signal: controller.signal }) ]); clearTimeout(timeoutId); // Clear the timeout since a promise succeeded. const originalData = await firstSuccessfulResponse.json(); console.log('Received original data:', originalData); // 3. structuredClone is used to create a true deep copy of the complex data. const clonedData = structuredClone(originalData); clonedData.meta.processed = true; console.log('Successfully cloned and modified data:', clonedData); return clonedData; } catch (error) { if (error instanceof AggregateError) { console.error('Both API calls failed:', error.errors); } else { console.error('An error occurred:', error.name); } }}processAndCloneData();async function processAndCloneData() { const controller = new ManualAbortController(); const timeoutId = setTimeout(() => controller.abort(), 800); console.log('Racing two API endpoints...'); try { const firstSuccessfulResponse = await Promise.any([ fetch('/api/fast-endpoint', { signal: controller.signal }), fetch('/api/slow-endpoint', { signal: controller.signal }) ]); clearTimeout(timeoutId); const originalData = await firstSuccessfulResponse.json(); console.log('Received original data:', originalData); const clonedData = structuredClone(originalData); clonedData.meta.processed = true; console.log('Successfully cloned and modified data:', clonedData); return clonedData; } catch (error) { if (error instanceof AggregateError) { console.error('Both API calls failed:', error.errors); } else { console.error('An error occurred:', error.name); } }}processAndCloneData();// modern-but-safe.js// Your tool should NOT find any issues in this file.const getUserProfile = async (id) => { const response = await fetch(`https://api.example.com/users/${id}`); const user = await response.json(); // These are modern but baseline-supported features const street = user?.address?.street ?? 'No street provided'; return `User ${user.name} lives on ${street}.`;};getUserProfile(1);const getUserProfile = async id => { const response = await fetch(`https://api.example.com/users/${ id }`); const user = await response.json(); const street = user?.address?.street ?? 'No street provided'; return `User ${ user.name } lives on ${ street }.`;};getUserProfile(1);