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
Polymer doesn't recognize inline svg in the HTML file (in pub build) #18484
Comments
This comment was originally written by @zoechi I think you miss the SVG element. see https://code.google.com/p/dart/issues/detail?id=997#c7 for more info |
This comment was originally written by dvo...@gmail.com I've made no change in the SVG element by dart script. It was written as static code, but in the process of building, the static code was processed like Polymer doesn't know the svg elements... |
Added Area-Polymer, Triaged labels. |
This comment was originally written by dvor...@gmail.com And it behaves bad way every time Polymer doesn't know the element (e.g. svg, mathml, custom element not processed by Polymer). Polymer always tries at least to add the closing tag to the element even if that element should not be closed or even if that element should have only the solidus (e.g. <linearGradient /> from svg). |
Hi dvorapa0, we have full support for parsing HTML with SVG. it uses the exact same parsing algorithm your browser uses. It's all straight from the HTML spec: if you can provide more information on what the exact HTML looks like I might be able to assist further. I'm not sure if this is what you were trying to do, but one thing to keep in mind: while the Custom Elements spec has been updated to include Custom SVG Elements, I don't think all of the implementations (Dartium, Polyfill) support this yet. Added NeedsInfo label. |
dvorapa0 - any updates here? |
This comment was originally written by dvo...@gmail.com Yes, I removed Polymer dependency and rewrited the Polymer content just to classic HTML. Now the pub build command is without issues about svg elements. For me everything done, so feel free to close it if you don't think it is important issue and should be fixed. |
Removed Area-Polymer label. |
Added this to the Later milestone. |
Added Polymer-P-2 label. |
Removed this from the Later milestone. |
Removed Polymer-P-2 label. |
Removed Polymer-Milestone-Later label. |
This comment was originally written by aleskv...@mailinator.com In a month I'll test it again if it throws still that errors in the newest SDK version with newest deps. I'll update this bug or create a new after that |
This comment was originally written by briangepper...@briangeppert.com I'm also having trouble with the Polymer transformer inserting closing tags for void elements like SVG's <linearGradient />. I've tried editing the transformer to fix the issue, but changing it in the packages directory doesn't seem to have any effect. I'm editing the copy in the /packages/ directory (which is, via junction points, the same one as in the pub cache). Am I missing something? |
This comment was originally written by @zoechi According to #14 this issue is solved. #5 asks for more details which weren't provided. Can you please provide more details about your HTML/SVG. |
This comment was originally written by aleskv...@mailinator.com Well, finally I made my project completely without Polymer, so I cannot test it again. But if briangep... has got his own demo with <tag />'s, let's share details with us... |
This comment was originally written by dvorapa1...@gmail.com It looks the author already solved the problem, this could be closed... |
I think this is stale, at least a really simple svg test works for me without any errors/warnings. Added AssumedStale label. |
This issue has been moved to dart-archive/polymer-dart#172. |
I think this issue is not closed. I've just made (dart 10.0.1 + polymer 16.3+3) a polymer component with an svg inside and I have warnings:
|
correct - this is just tracked in dart-archive/polymer-dart#172 - the closed status here is just to avoid duplication and make sure we only track this in one place. Cheers! |
never mind - I just noticed that it indeed had the closed status there. Thanks for filing it again. |
You are welcome. Thank you for the good work! Il giorno ven 12 giu 2015 20:09 sigmundch notifications@github.com ha
|
This issue was originally filed by dvor...@gmail.com
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Polymer running pub build should recognize and handle with inline svg elements in an usual way (just like HTML elements). But it throws unexpected warnings (see below).
What version of the product are you using? On what operating system?
Dart 1.3.3, Polymer 0.9.5+2, Windows 7
I also use the widget.dart as a dependency from its GitHub repository (version 0.3.0-dev)
Please provide any additional information below.
Pub Build output:
C:\Users\Pavel\Projects\my-project>pub build --trace
find: > bin [: No such file or directory
Loading source assets... (2.5s)
Loading observe transformers... (5.5s)
Loading polymer transformers... (2.4s)
Building pavel_dvorak... (0.5s)
[Warning from polymer (Linter) on widget|lib/components/carousel.html]:
lib/components/carousel.html:16:7: definition for Polymer element with tag name
"swap-widget" not found.
[Warning from polymer (Linter) on pavel_dvorak|web/index.html]:
web/index.html:15:1: Named entity expected. Got none.
[Warning from polymer (Linter) on pavel_dvorak|web/index.html]:
web/index.html:59:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (Linter) on pavel_dvorak|web/index.html]:
web/index.html:74:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (Linter) on pavel_dvorak|web/index.html]:
web/index.html:89:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (InlineCodeExtractor) on pavel_dvorak|web/index.html]:
web/index.html:15:1: Named entity expected. Got none.
[Warning from polymer (InlineCodeExtractor) on pavel_dvorak|web/index.html]:
web/index.html:59:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (InlineCodeExtractor) on pavel_dvorak|web/index.html]:
web/index.html:74:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (InlineCodeExtractor) on pavel_dvorak|web/index.html]:
web/index.html:89:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ImportInliner) on pavel_dvorak|web/index.html]:
web/index.html:15:1: Named entity expected. Got none.
[Warning from polymer (ImportInliner) on pavel_dvorak|web/index.html]:
web/index.html:59:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ImportInliner) on pavel_dvorak|web/index.html]:
web/index.html:74:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ImportInliner) on pavel_dvorak|web/index.html]:
web/index.html:89:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ScriptCompactor) on pavel_dvorak|web/index.html]:
web/index.html:86:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ScriptCompactor) on pavel_dvorak|web/index.html]:
web/index.html:101:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ScriptCompactor) on pavel_dvorak|web/index.html]:
web/index.html:116:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (PolyfillInjector) on pavel_dvorak|web/index.html]:
web/index.html:86:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (PolyfillInjector) on pavel_dvorak|web/index.html]:
web/index.html:101:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (PolyfillInjector) on pavel_dvorak|web/index.html]:
web/index.html:116:1: Unexpected end tag (lineargradient). Ignored.
[Info from Dart2JS]:
Compiling pavel_dvorak|web/index.dart...
No method named 'hide' in class 'DialogElement'.
heslo.hide();
^^^^^^^^^^^^
103 methods retained for use by dart:mirrors out of 2722 total methods (4%).
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors' show TypeMirror;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:29.032661 to compile pavel_dvorak|web/index.dart.
[Info from Dart2JS]:
Compiling pavel_dvorak|web/index.html_bootstrap.dart...
No method named 'hide' in class 'DialogElement'.
heslo.hide();
^^^^^^^^^^^^
102 methods retained for use by dart:mirrors out of 2841 total methods (4%).
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
Import of 'dart:mirrors'.
import 'dart:mirrors' show TypeMirror;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:16.017917 to compile pavel_dvorak|web/index.html_bootstrap.dart.
Built 51 files to "build".
C:\Users\Pavel\Downloads\pavel-dvorak>
The text was updated successfully, but these errors were encountered: