harden: drop 'unsafe-inline' from style-src (closes #328)
The popup's markup no longer carries style attributes. The 42 in index.html and in the HTML the view helpers build are now Tailwind classes, each computing to the value it replaced, so style-src is 'self' in both manifests, pinned in tests/manifest.test.js. The address dot's 16 colours are written out as whole classes, because Tailwind builds only the classes it finds in the source. The Settings debug well is shown and hidden with the hidden class, since clearing an inline display no longer uncovers it. Two tests that found the colour dot by its inline style now find it by its class. Script that sets element.style is unaffected. Model: opus-5-5
This commit is contained in:
+1
-1
@@ -311,7 +311,7 @@ test("transaction detail renders an ERC-20 transfer (#151)", async (env) => {
|
||||
"token contract row missing the contract address, got: " +
|
||||
JSON.stringify(contractText),
|
||||
);
|
||||
const dots = await contract.locator('span[style*="border-radius"]').count();
|
||||
const dots = await contract.locator('span[class*="rounded-[50%]"]').count();
|
||||
assert(dots > 0, "token contract row rendered without its colour dot");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user