Skip to content

IE11 throws errors when using the style attribute #2722

@charlier

Description

@charlier

Reproduction

In IE11, if you have a style attribute in your application, Preact throws an error.
This looks like a regression introduced in 10.4.8, as reverting to 10.4.7 yields happiness.

Steps to reproduce

  1. Create something with a style attribute
const App = () => (
	<div style="display: block;">
		Hello World!
	</div>
)
  1. Open your app in IE11
  2. Check for errors

Expected Behavior

The application renders correctly, without any errors.

Actual Behavior

IE throws an error

Assignment to read-only properties is not allowed in strict mode

A workaround is to just use classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions