Closed sounisi5011 closed 5 months ago
Hi @sounisi5011,
That's a good point. We'll publish a new version in the coming days with a fix. Thank you for taking the time to create the issue.
@sounisi5011 many thanks for your bug report and suggestions for fixing. I'm happy to let you know that v0.0.4 has been released and should fix this issue. Thanks again and if you do like this version more please do reconsider leaving us a few more stars on the chrome web store.
Currently, this extension sets its own
id
attribute value to the targetimg
element when verifying.https://github.com/digimarc-corp/c2pa-content-credentials-extension/blob/66a02d410f6fd53ace934ffebc5b05fb97cb49a1/lib/imageUtils.js#L266-L267
However, this behavior breaks the CSS layout on some sites that depend on the
id
attribute value, and also breaks the JavaScript that retrieves the element from theid
attribute.In general, a website assumes that the
id
attribute value will not change (or will only be changed by the website itself).id
attributes are unique; they should not be rewritten by browser extensions. If a browser extension rewrites theid
attribute value, the pre-existingid
attribute value is lost.Browser extensions MUST NOT rewrite
id
attribute values. Instead, use thedata-*
attribute or hold the object value of the DOM element itself in thehandledImages
array.