Skip to content

Avoid inline css and js in dev - #5315

Open
mohe2015 wants to merge 1 commit into
DioxusLabs:mainfrom
mohe2015:csp-avoid-inline-js-and-css
Open

mohe2015 wants to merge 1 commit into
DioxusLabs:mainfrom
mohe2015:csp-avoid-inline-js-and-css

Conversation

@mohe2015

@mohe2015 mohe2015 commented Feb 14, 2026 •

Copy link
Copy Markdown
Contributor

When developing a browser extension using dioxus you are not allowed to use inline JavaScript because of a strict enforced content security policy. See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_security_policy for Manifest V3.

@mohe2015
mohe2015 requested a review from a team as a code owner February 14, 2026 15:38
Comment thread packages/cli/src/build/request.rs Outdated
@jkelleyrtp jkelleyrtp added the cli Related to the dioxus-cli program label Mar 28, 2026
@jkelleyrtp

Copy link
Copy Markdown
Member

Is this solving an issue in the tracker? I can't find anything. Why do we need to do this?

@mohe2015

mohe2015 commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Oh sorry for the missing description etc, there is no existing issue. When developing a browser extension using dioxus you are not allowed to use inline JavaScript because of a strict enforced content security policy. See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_security_policy for Manifest V3.
The change I commented on could probably be dropped if you don't like it's side effects. (Removed)

@mohe2015
mohe2015 marked this pull request as draft May 10, 2026 22:06
@mohe2015
mohe2015 force-pushed the csp-avoid-inline-js-and-css branch from b5a3e72 to c06e461 Compare May 10, 2026 22:15
@mohe2015
mohe2015 marked this pull request as ready for review May 10, 2026 22:15
@mohe2015

mohe2015 commented May 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Would it be possible to merge this please? I removed all controversal changes. This is needed to develop browser extensions using dioxus.

@mohe2015
mohe2015 force-pushed the csp-avoid-inline-js-and-css branch from c06e461 to 79d9633 Compare October 24, 2026 12:22
@mohe2015
mohe2015 force-pushed the csp-avoid-inline-js-and-css branch from 79d9633 to 7cc55f7 Compare October 24, 2026 12:24
@mohe2015

Copy link
Copy Markdown
Contributor Author

Friendly bump, this is needed to develop browser extensions using dioxus as they have a strict Content Security Policy

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to the dioxus-cli program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants