Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: style attribute for xml in ws factory #7554

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Conversation

maribethb
Copy link
Contributor

The basics

The details

Resolves

Fixes broken workspace factory

Proposed Changes

Reverts changes in #7503 to the workspace factory that broke it

Reason for Changes

The JavaScript class Element doesn't have a style property. Only HTMLElements have a style property that can be set directly via JS.

<xml> elements in the DOM do have a style attribute, so we can set the attribute using the setAttribute API. This makes the CSP unhappy, but not really sure how to prevent that since there is no style property. Since this code is outside the library, we won't be breaking the CSP for anyone using blockly. Just on our own hosted demos site.

The dev-tools code will be removed soon.

Test Coverage

tested manually

Documentation

Additional Information

@maribethb maribethb requested a review from a team as a code owner September 28, 2023 22:18
@github-actions github-actions bot added the PR: fix Fixes a bug label Sep 28, 2023
@maribethb maribethb merged commit ca4fa7e into google:develop Sep 28, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants