Skip to content
This repository has been archived by the owner on Dec 17, 2020. It is now read-only.

Use innerHTML property to set dynamic resource as an image #206

Closed
wants to merge 1 commit into from

Conversation

denis-anisimov
Copy link

@denis-anisimov denis-anisimov commented Mar 9, 2017

For some reasons EDGE doesn't show svg image created from the server
side. So instead of creating a real "object" element it's set as
"innerHTML" property for its "fake" parent element.

Fixes #184


This change is Reviewable

For some reasons EDGE doesn't show svg image created from the server
side. So instead of creating a real "object" element it's set as
"innerHTML" property for its "fake" parent element.

Fixes #184
@vaadin-tc
Copy link

SonarQube analysis reported 2 issues

  • MAJOR 2 major

Watch the comments in this conversation to review them.

@@ -61,7 +61,8 @@ private void createGenerateImageButton() {
Button button = new Button("Generate image");

button.addClickListener(event -> {
image.setAttribute("data", createResource());
// image.setAttribute("data", createResource());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR This block of commented-out lines of code should be removed. rule

image.getStyle().set("display", "block");
image.setAttribute("data", createResource());
image = new Element("div");
// image.setAttribute("type", "image/svg+xml");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR This block of commented-out lines of code should be removed. rule

@Legioth
Copy link
Member

Legioth commented Mar 10, 2017

Let's fix this on the framework side instead of making the demo more complex. See vaadin/flow#1344 for details.

@Legioth Legioth closed this Mar 10, 2017
@denis-anisimov denis-anisimov added this to the Abandoned milestone Mar 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants