Open progelio opened 6 years ago
@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:
<!DOCTYPE html>
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 notifications@github.com 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 https://github.com/x-tag/core-2/issues/9#issuecomment-386891297, 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)"
here is a image tof he jasmine stack trace, would you like a pr with the Jasmine @csuwildcat ?
thanks @progelio.
Not a problem. This is actually a great project. Awesome work.
Jasmine Spec list image:
@csuwildcat could this.render()
be kickstarting the behavior by initiating the promise?
https://codepen.io/kipomaha/pen/XqeGNd
here is a link to a codepen I created with a codepen jasmine template @progelio
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 I got the pen working here => https://codepen.io/kipomaha/pen/XqeGNd [at the same pen url]
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...super.funct()
....probably good that I don't use it much. Thanks for the information
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 notifications@github.com 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 https://github.com/x-tag/core-2/issues/9#issuecomment-390063328, 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. 👍