👉 The `javascript:infection` property in JavaScript is used to apply a specific behavior or function when a script is executed, particularly in the context of cross-origin resource sharing (CORS) and web security. When a script with this property is loaded from an external source, it can trigger a "fetch" request to a specified URL, but only if the server hosting that resource includes the `javascript:infection` attribute. This mechanism allows developers to intercept and modify network requests made by the script, enabling features like preventing malicious scripts from accessing sensitive data or performing unauthorized actions on a webpage. Essentially, it adds a layer of security by ensuring that only trusted scripts can interact with specific resources, reducing the risk of cross-site scripting (XSS) attacks.