Comments (2)
- maybe your code like this
<!-- html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script>
console.log('test'); // inline-script
</script>
</head>
<body></body>
</html>
you can put your script into an Independency script.js file
// test.js
console.log('test')
<!-- html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script src="test.js"></script>
</head>
<body></body>
</html>
- you can try to add
CSP
<!-- html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'">
<title>Document</title>
<script>
console.log('test'); // inline-script
</script>
</head>
<body></body>
</html>
from react.
No enough info to help, and this issue is related to your specific setup/framework and not react itself.
from react.
Related Issues (20)
- Bug: eslint-plugin-react-hooks `exhaustive-deps` rule shouldn't warn when using an object's property HOT 3
- [DevTools Bug]: Consistent memory leak when refreshing on React + non-React websites. HOT 16
- Bug: Adding StrictMode component leads to cases that can't happen in concurrent mode. HOT 3
- Bug: <link> onLoad event happened but not triggered (18.2.0 & 18.3.0-canary-2e470a788-20240214) HOT 1
- Introducing `UseConstantState()` - A Novel Approach to Permanent State Management 🚀 HOT 6
- Bug: `textarea` inputs in Safari stop accepting input if certain lines are deleted HOT 5
- React Project Doesn't display on browser HOT 2
- Bug: Undo/Redo not behaving as expected for controlled input when state is updated from an async callback HOT 3
- Bug: React can leak the whole subtree when using contentEditable (reproduction sscce included) HOT 2
- Request: Define to exports cjs/* files in package.json
- Feature request: Define prop preprocessor
- Bug: errors caught by error boundaries appear in console twice HOT 1
- Bug: `flushSync` does not work HOT 2
- Bug: Next.js Build Errors Fix HOT 1
- Bug: Use useId function to generate dom id,it can't use document.querySelector function. HOT 6
- Bug: Despite having implemented optimizations such as shouldComponentUpdate or PureComponent HOT 7
- Bug: unable to compile standalone binary in Deno with server rendering, while using Typescript.
- RSS feed for the blog HOT 3
- Bug: Using useSyncExternalStore with SSR and no getServerSnapshot results in error HOT 6
- Nested <form> elements error with "A React form was unexpectedly submitted." HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.