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

Web component ??? #1002

Closed
Mohamed-Kaizen opened this issue Dec 18, 2018 · 7 comments
Closed

Web component ??? #1002

Mohamed-Kaizen opened this issue Dec 18, 2018 · 7 comments

Comments

@Mohamed-Kaizen
Copy link

Can brython do something like this:
Class My comp extends HTMLElement{
Constructor (){...}
ConnectedCallback (){...}
disconnectedCallback (){...}
}

basically making Web components with brython

@Ordiel
Copy link
Contributor

Ordiel commented Jun 15, 2019

#27

@PierreQuentel
Copy link
Contributor

Sorry for the very late reaction to this issue, I was not familiar with the Web Component technology.

I have taken a little time to teach myself the basics, and in the commit referenced above I have implemented it through a new module, browser.webcomponent, which exposes a class WebComponent used as a metaclass to define custom HTML tags and their behaviour. I have written a short documentation page and added an example in the gallery (webcomponent.html).

Can you take a look and tell me what you think ?

@Ordiel
Copy link
Contributor

Ordiel commented Jun 15, 2019

Good documentation; its good to mention that I am not precisely that well versed on the web technologies world, but for the little I know I really like what I am seeing

I am anxious to give it a try, is it in a build I can pull, or better folder to download?

@PierreQuentel
Copy link
Contributor

The standard way of getting the current development version is first to do git clone to get a local copy of the repository, and git pull to update to the latest commit.

If you are not familiar with git, you can also download a zip file with the links "Clone or download / Download ZIP" from the Brython Github home page.

@Ordiel
Copy link
Contributor

Ordiel commented Jun 20, 2019

what would I need to do if I wanted to create a package for local testing (as the ones in the download page)?

I tried by going into the npm dir and running npm link but the package it created was empty, I went through both the readme and contributing documents but there is no mention on how to achieve this.

Thanks in advance Pierre

@Mohamed-Kaizen
Copy link
Author

Sorry for the very late reaction to this issue, I was not familiar with the Web Component technology.

I have taken a little time to teach myself the basics, and in the commit referenced above I have implemented it through a new module, browser.webcomponent, which exposes a class WebComponent used as a metaclass to define custom HTML tags and their behaviour. I have written a short documentation page and added an example in the gallery (webcomponent.html).

Can you take a look and tell me what you think ?

thanks it work, sorry for the very late replay

@Ordiel
Copy link
Contributor

Ordiel commented Jul 5, 2019

When will this be officially released? (latest version is still 3.7.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants