-
Notifications
You must be signed in to change notification settings - Fork 116
Some V1 examples in README.md and in other sites not working ! #85
Comments
are you transpiling? if the answer is yes, you are pointing the finger at the wrong issue (neither Canary, nor this polyfill)
it's not even finished, not sure how to answer this. Few parts are ready for production and available through this poly. Developer browsers might be unstable, and I won't fix them, but I'll ensure stable browsers will work. Firefox nightly, for instance, is a black hole of errors so far. It exposes the API and it throws with 3/4 of it: I don't care.
It does its best to polyfill them. Few parts of the specs are unpolyfillable. The constructor is one of these cases, described in here: https://www.webreflection.co.uk/blog/2016/08/30/js-super-problem and also in this repo: |
as well ... as ! Without compiling in Canary ( v56.0.2891.0) the "extend native components" e.g. button, form, ui, etc not working, The problem is i have/must to transpile my code. With v0 i have no problems when extending native components (HTMLButtonElement, HTMLImageElement, etc). Im using an other polyfill for v0. Thank you for your answer and for https://www.webreflection.co.uk/blog/2016/08/30/js-super-problem#not-so-easy-though. I think v1 is in 1 - 2 years ready for production (incl. polyfill) like v0 ! We need more native behaviors (ES6 => extends, etc) and the disappearance of the old browsers. |
It works on chrome and so does v0 too. Use the test page and go in console On Sunday, 16 October 2016, Bitcollage notifications@github.com wrote:
|
P.S. you can't transpile V1, there is a Babel bug for this issue On Sunday, 16 October 2016, Andrea Giammarchi andrea.giammarchi@gmail.com
|
What i mean is, i paste (without compiling) following code in stable Chrome v54.0.2840.59 where is "customElements.define" is available (natively). It does not work. Getting error: // extends some different native constructor
class MyButton extends HTMLButtonElement {}
// define it specifying what's extending
customElements.define('my-button', MyButton, {extends: 'button'});
// append this in dom "<button is="my-button">click me</button>" not working
// creating with new not working
document.body.appendChild(
new MyButton
).textContent = 'click me'; error:
Maybe its time to develop a new babel-plugin (https://www.webreflection.co.uk/blog/2016/08/30/js-super-problem). I think i can do that (https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md). Will give you feedback in some days. What do you think @kittens @hzoo? Is there a bug-ticket for that or can we develop a mod-plugin? |
I've tried right now on this page opening the console. Everything works fine. |
Canary Version 56.0.2891.0 canary (64-bit) |
@WebReflection Please open "NOT" your Testpage ! "OPEN" www.google.com (no polyfill) with v56.0.2891.0 canary or with v54.0.2840.59 and then paste the code. The code does not even work in a stable version( v54.0.2840.59). Why i should use a polyfill that not working on stable version where is v1 available. I hope you understand this time what i mean !!!! |
I see ... you were complaining about non polyfilled case but then I'm not sure why you would open a bug in here ... btw, now I understand your last question:
Yes, this polyfill implements W3C specs including native builtins extend |
because v54.0.2840.59 is "STABLE" and v1 is available and then i assume that should works ! i thought something gone wrong. |
Wrong assumption. Firefox Nightly exposes a completely broken API and Safari wasn't implementing This is a polyfill that brings Custom Elements V1 on every browser that was previously compatible/polyfilled for V0 |
you had written:
|
Indeed Firefox stable, as well as Chrome, and Safari, are working. How can I help you now? ... edit: all supported browsers here https://github.com/WebReflection/document-register-element#tested-on |
Yes you could help me. With polyfill it works and without it not works. The browsers are not yet ready although in stable available. |
i know now, your polyfill works according the spec |
@WebReflection What do you think about a babel-plugin for compiling a better code (https://www.webreflection.co.uk/blog/2016/08/30/js-super-problem)? Makes sense or not? |
do you understand this polyfill exists so you don't care about when browsers would be ready?
there is a bug already on babel repo. Feel free to push a PR or help resolving, thanks. |
right
i will try to solve this problem.
thank you for the link |
In Chrome Canary v56.0.2891.0 where is V1 ( natively ) available are the most examples with "extend native components" not working !
Example on README.md not working
Error:
Same effect with examples (extend native components) on this sites not working
This was a minimal analysis !
My Question, whats going wrong and is v1 really ready for production?
Do you think the Polyfill mirror the spec (W3C Working Draft)? and i think the spec not behave as expected!
The text was updated successfully, but these errors were encountered: