Git Product home page Git Product logo

dangerously-set-html-content's People

Contributors

christo-pr avatar tkrotoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dangerously-set-html-content's Issues

Could not find a declaration file for module 'dangerously-set-html-content'

TS7016: Could not find a declaration file for module 'dangerously-set-html-content'. '/myproj/node_modules/dangerously-set-html-content/dist/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/dangerously-set-html-content if it exists or add a new declaration (.d.ts) file containing `declare module 'dangerously-set-html-content'

version: "dangerously-set-html-content": "^1.0.10",

Script not working with Firefox

The following script is working with Chrome, Brave etc. but not with Firefox. Any ideas how come?

<script id="infogram_0_f9a95501-dd35-4d1f-8a2b-936b023b53b9" title="Demonstrationen im Jahr 2022" src="https://e.infogram.com/js/dist/embed.js?Nxk" type="text/javascript"/>

Problems with rendering multiple scripts

Hi, some strange things happened when I was using this InnerHTML component.
When I tried to include a script from a remote source (with the src attribute) along with another script written by myself, it returned a ReferenceError implying the function from the src script was not being recognized in the script I added. To be more specific, I was implementing a map in my HTML page using Mapbox service and got this error: ReferenceError: mapboxgl is not defined, where the function mapboxgl already exists in the src script.
Has anyone experienced the same issue or was I wrong about the use of this component to some extent?

Reactjsv17.0.2 dependency issue

Node version:
v16.20.

Reactjs version:
17.0.2

Error:
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.2.0" from [email protected]
npm ERR! node_modules/dangerously-set-html-content
npm ERR! dangerously-set-html-content@"*" from the root project

Passing `""` to `html` cause a runtime error

Passing empty string "" to html prop cause a runtime error:

Uncaught Error: html prop cant't be null

The sample code is:

import InnerHTML from "dangerously-set-html-content";

export default function App() {
  return (
    <div className="App">
      <InnerHTML html={""} />
    </div>
  );
}

Working example is:
https://codesandbox.io/s/mutable-violet-g00km1?file=/src/App.tsx

The problem did not exist in dangerously-set-html-content 1.0.8 at least.

Packages:

  • dangerously-set-html-content: 1.0.13
  • react: 18.2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.