Needed some minor rearchitecturing of how imports are managed.
Cons: CSP changes. The importmap cannot be in a separate file.
Needed some minor rearchitecturing of how imports are managed.
Cons: CSP changes. The importmap cannot be in a separate file.
Needed some minor rearchitecturing of how imports are managed. Cons: CSP changes. The importmap cannot be in a separate file.
@ -2230,2 +2230,4 @@
</div>
`;
// Auto-close error box after 5000 ms
useEffect(() => {
We don't use functional hooks in gamja. It should be possible to achieve the same thing with lifecycle methods: https://preactjs.com/guide/v10/components/#lifecycle-methods
I'm not sure if I can insert lifecycle methods into here without touching a lot of code, as the docs appear to claim that lifecycle methods only work with class components (and class components are depreciated / not recommended / code smell in React).
Class components are deprecated with React, but they are supported with Preact. gamja uses exclusively class components, and only uses functional components when there is no need to keep state.
App is already a class component.
@ -3,3 +3,3 @@
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'none'; object-src 'none'; connect-src *;">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'none'; script-src 'self' 'sha256-ZeafWUhxdQLP3YNleZ4clVqV75+nYLKaHzqf9Z2DM60='; object-src 'none'; connect-src *;">
lib/index.js isn't great and import maps would nicely allow us to import directly libraries, however I don't think it's worth it if we have to maintain this hash.
We could do unsafe-inline but that gives me the ick. As far as I can tell, there's no way to do import maps without unsafe-inline or a build step.
Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?