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

polymer-element extends select element has error #18958

Closed
DartBot opened this issue May 22, 2014 · 16 comments
Closed

polymer-element extends select element has error #18958

DartBot opened this issue May 22, 2014 · 16 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.

Comments

@DartBot
Copy link

DartBot commented May 22, 2014

This issue was originally filed by joo.tsao...@gmail.com


What steps will reproduce the problem? see follow sample

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sample app</title>
    
    <link rel="import" href="packages/polymer/polymer.html">
  </head>
  <body>
    <polymer-element name="x-select" extends="select">
      <template>
        <style>
          :host {
            color: blue;
          }
        </style>
        
        <content></content>
      </template>
      <script type="application/dart;component=1">
      import 'dart:html';
      import 'package:polymer/polymer.dart';

      @­CustomTag('x-select')
      class XSelect extends SelectElement with Polymer, Observable {
        XSelect.created(): super.created() {
          polymerCreated();
        }
      }
      </script>
    </polymer-element>
    
    <select is="x-select">
      <option value="1">test1</option>
      <option value="2">test2</option>
    </select>
  </body>
</html>

What is the expected output? What do you see instead?

Uncaught HierarchyRequestError: Failed to execute 'createShadowRoot' on 'Element': Author-created shadow roots are disabled for this element.

What version of the product are you using? On what operating system?

dart sdk and editor: 1.4.0.dev_06_09
polymer: 0.10.0-pre.12
OS: debian 8.0
run on chrome 35 by dart2js

Please provide any additional information below.

run on chrome 34 by dart2js no problem.

@anders-sandholm
Copy link
Contributor

Added Area-Polymer, Triaged labels.

@jmesserly
Copy link

Removed Area-Polymer label.
Added Pkg-Polymer, Area-Pkg labels.

@DartBot
Copy link
Author

DartBot commented Jun 24, 2014

This comment was originally written by Roman.Korneyev@gmail.com


the similar bug https://code.google.com/p/dart/issues/detail?id=19561 (!)

@DartBot
Copy link
Author

DartBot commented Jun 24, 2014

This comment was originally written by joo.tsao...@gmail.com


Please fixed the issue, thanks!

@sigmundch
Copy link
Member

Issue #19561 has been merged into this issue.

@sigmundch
Copy link
Member

It seems that this is a restriction from blink's native implementation of shadow-root. I have to investigate more if this is intentional or a bug though.

Here is an example that using Javascript alone. The call to div.createShadowRoot() works fine, but the same call on the select element gives the error above. The error also shows up if I switch to use a textarea element (as in issue #19561).

    <select is="x-a"><option>1</option></select>
    <div is="x-b"><span>2</span></div>
    <script>
      var A = function() {};
      A.prototype = Object.create(HTMLSelectElement.prototype);
      A.extends = 'select';
      document.registerElement('x-a', A);
    
      var B = function() {};
      B.prototype = Object.create(HTMLDivElement.prototype);
      B.extends = 'div';
      document.registerElement('x-b', B);
    
      var div = document.querySelector('div');
      div.createShadowRoot().innerHTML = '[<content></content>]';
    
      var select = document.querySelector('select');
      select.createShadowRoot().innerHTML = '<content></content>';
    </script>

@sigmundch
Copy link
Member

Added this to the 1.6 milestone.
Removed Priority-Unassigned label.
Added Priority-Medium label.

@sigmundch
Copy link
Member

Removed this from the 1.6 milestone.
Added Polymer-P-1 label.

@sigmundch
Copy link
Member

Removed Polymer-P-1 label.
Added Polymer-Milestone-Next label.

@sigmundch
Copy link
Member

Added PolymerMilestone-Next label.

@sigmundch
Copy link
Member

Removed Polymer-Milestone-Next label.

@DartBot
Copy link
Author

DartBot commented Jul 12, 2014

This comment was originally written by kurotensh...@autistici.org


I am the same problem. Not possible to extend img or textarea, which obliges me to create the components from scratch...

I am using Polymer 0.12.0-dev.

@jakemac53
Copy link
Contributor

It looks like this is the blink bug for this, https://code.google.com/p/chromium/issues/detail?id=234020. Some progress has been made it looks like, but there has not been any activity recently... Also I don't know if other browsers have similar issues or not.

@DartBot
Copy link
Author

DartBot commented Sep 4, 2014

This comment was originally written by joo.tsa...@gmail.com


update to sdk 1.6.0 and polymer 0.13.0+3, this issue is still not resolved.

@sigmundch
Copy link
Member

Sorry @­joo.tsao - unfortunately this looks like a bug all the way in blink/chrome. The link that Jake posted in #­15 will let you know when the issue gets fixed there.

After they fix it, it will take some time until you see it live. In particular, if you are using the beta channel, it normally takes 6 weeks until changes get released there.

@DartBot DartBot added Type-Defect area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels Sep 4, 2014
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/polymer-dart#190.

@DartBot DartBot closed this as completed Jun 5, 2015
@kevmoo kevmoo removed the triaged label Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.
Projects
None yet
Development

No branches or pull requests

6 participants