CSP Inline style complaints (Electron)

157 views
Skip to first unread message

William Li

unread,
Jun 7, 2023, 9:17:46 PM6/7/23
to Blockly
I think my previous message got deleted for some reason, trying again just to see if it'll work: 

I think that loading Blockly isn't working, I'm getting some unsafe inline style complaints. I can't add the hash (although I tried), because of https://stackoverflow.com/questions/52724956/why-doesnt-chrome-respect-my-content-security-policy-hashes

I don't remember having to deal with this issue before, not sure what I changed to make this error. 

An example of a line causing one of the errors: Screenshot 2023-06-07 at 6.12.17 PM.png

Console: Screenshot 2023-06-07 at 6.08.12 PM.png

Beka Westberg

unread,
Jun 9, 2023, 4:30:02 PM6/9/23
to blo...@googlegroups.com
Hello,

I don't think Blockly is compatible with CSP :/ We use style attributes in several places, and we can't remove them because it changes the CSS precedence (which external developers depend on).

If you want to get this working, I think you need to add unsafe-inline to your keyword list.

I hope that helps! If you have any further questions please reply =)
--Beka

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/23607de9-d0b7-4fb7-b544-66ec3c5a761bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages