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
Can't extend paper_elements/core_elements #20388
Comments
Added Area-Pkg, Pkg-Polymer, Triaged labels. |
There is no support for extending JS elements from Dart - so this is, unfortunately, working as designed. We should investigate to see if we can add more intuitive error messages though. Removed Priority-Unassigned label. |
This comment was originally written by @terrasea I actually am not sure that is 100% correct. You're right that the JS code |
I think it would be to confusing to allow people to extend the template but not the backing class, and its best to just disable it entirely. There is a workaraound though which I just tested and confirmed can work if you just want to extend the template. Simply add the 'noscript' tag to your element. This actually creates it as a JS element and works just fine for extending the template, see https://gist.github.com/jakemac53/89f9c01f2cb4618fb12c as an example. Added AsDesigned label. |
This comment was originally written by @filiph Please do provide a better error message here. I just lost an hour trying to extend paper-button before I found this bug. |
This comment was originally written by vloz...@gmail.com I agree with #5. I wasted my time too... :'( |
This comment was originally written by rpurus...@gmail.com As did I, please update the error message! |
This issue has been moved to dart-archive/polymer-dart#260. |
This issue was originally filed by @terrasea
What steps will reproduce the problem?
<link rel="import" href="../../packages/polymer/polymer.html">
<link rel="import" href="../../packages/paper_elements/paper_item.html">
<polymer-element name="x-item" extends="paper-item">
<template>
<shadow></shadow>
<template>
<script type="application/dart" src="x_item.dart"></script>
</polymer-element>
@CustomTag('x-item')
class XItem extends PaperItem {
XItem.created() : super.created();
}
2. add the element to an html page
<link rel="import" href="x-item.html">
...
<x-item label="item"></x-item>
...
3. run it in Dartium
What is the expected output? What do you see instead?
I should see exactly the same output as you'd expect form paper-item, what I get is nothing, and in fact all other polymer elements don't load either.
What version of the product are you using?
Dart Editor version 1.6.0.dev_06_00 (DEV)
Dart SDK version 1.6.0-dev.6.0
On what operating system?
Gentoo Linux
What browser (if applicable)?
Dartium
Please provide any additional information below.
I asked a question on it in stackoverflow which should provide more info
http://stackoverflow.com/questions/25154969/extending-paper-item-in-polymer-dart/25155032#­25155032
The text was updated successfully, but these errors were encountered: