Skip to content

TypeError: Failed to set an indexed property [0] on 'CSSStyleDeclaration #110

Description

@wogno

Hi guys, I faced with this error

TypeError: Failed to set an indexed property [0] on 'CSSStyleDeclaration': Indexed property setter is not supported.
at setValueForStyle (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=5deb1073:2145:452)
at setValueForStyles (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=5deb1073:2192:55

My code
<Document > 
            <Page>
                <Html>{html}</Html>
            </Page>
        </Document>
        
  My HTML
   const html = `<html>
<style> .my-heading4 { background: darkgreen; color: white; } pre { background-color: #eee; padding: 10px; } </style>

Heading 1

Heading 2

Heading 3

Heading 4

Paragraph with bold, italic, underline, strikethrough, and all of the above

link


  • Unordered item
  • Unordered item
  1. Ordered item
  2. Ordered item





Text outside of any tags
Column 1 Column 2 Column 3
Foo Bar Foobar
Foo Bar
Some longer thing Even more content than before! Even more content than before!
`;

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions