puppeteer/test/assets/prerender/index.html

22 lines
436 B
HTML
Raw Permalink Normal View History

2023-08-28 06:20:57 +00:00
<!DOCTYPE html>
<head>
<script>
function addRules() {
const script = document.createElement('script');
script.type = 'speculationrules';
script.innerText = `
{
"prerender": [
{"source": "list", "urls": ["target.html"]}
]
}
`;
document.head.append(script);
}
</script>
</head>
<body>
<button onclick="addRules()">add rules</button>
<a href="target.html">test</a>
</body>