-
Notifications
You must be signed in to change notification settings - Fork 8
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
::template(true) not working with connectedCallback #9
Comments
@csuwildcat I just plugged this into jasmine and it's working as described by @progelio |
I don't know what jasmine is. I will find out. Try this: <title></title> <script src="x-tag-polyfilled.js"></script>
|
If you have codepen I could provide a link to it with the test |
Ok, just made a codepen account. Here it is: |
The template extension is a class mixin that uses the connectedCallback, so
I'm guessing if you call super() in the custom element's connectedCallback
declaration, it will work as intended.
…On Sun, May 6, 2018, 9:25 AM progelio ***@***.***> wrote:
Ok, just made a codepen account. Here it is:
https://codepen.io/progelio/pen/VxMgme
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAICyqvmitvLoqWRRaOALTMkrFuHvWIkks5tvyPygaJpZM4T0FvX>
.
|
Got the error below. SyntaxError: super() is only valid in derived class constructors. |
this.render() works instead of super(). But, I think the presence of "connectedCallback" shouldn't interfere with "::template(true)" |
|
thanks @progelio. |
Not a problem. This is actually a great project. Awesome work. |
@csuwildcat could |
https://codepen.io/kipomaha/pen/XqeGNd here is a link to a codepen I created with a codepen jasmine template |
for some reason its not passing the specs like in the jasmine image above |
If you go to settings on the codepen you can see the dependencies by clicking the javascript tab when the settings screen pops up |
okay @progelio @csuwildcat |
you can fork if you want their is a total of three errors |
I modded the original pen that had the error with the super call and it works: https://codepen.io/csuwldcat/pen/QrJrRg |
If you override a function, you must call super.FN_NAME(), so that the previous version of the function in the prototype chain is also called. |
Nice did you want that to be put on the jasmine for the docs? |
lol...I just looked in to super more I forgot you can use it like that duh... |
Yeah, we should probably document that functions that are extended require
this.
On a more general point: I want to get more of your contributions in, I
just been trying to find a way of taking some as smaller pulls that I can
digest easier. This is more about all the outstanding ones, not this exact
issue.
…On Thu, May 17, 2018, 6:11 PM KIP ***@***.***> wrote:
lol...I just looked in to super more I forgot you can use it like that
duh...super.funct()....probably good that I don't use it much. Thanks for
the information
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAICyjJNS93hsZ7-Yx7DqmybY6nTHttyks5tzh_bgaJpZM4T0FvX>
.
|
It's not a big deal, I stopped making PR's, because I figured you'd get to it when you got to it. 👍 |
The text was updated successfully, but these errors were encountered: