question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add docs on how to access HTML elements from PyScript

See original GitHub issue

Original question: Trying to move some of the JavaScripts to pyscript, its there a way to of something like this in pyscript now?

var metas = document.getElementsByTagName('meta');

There is! There are some examples in this very issue. Adding docs for it would be very easy =) I think it probably fits under the “How to” or the “Reference session”, maybe? Depending on how the person who chooses to tackle this one decides to go about it. Probably easier to add it on the “how to” though because I think @tedpatrick has specific ideas on how the reference should go.

In case you need help for this, please let me know! We have docs on how to contribute to the docs, but maybe they’re not so clear. Thank you!

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:5
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
cceydacommented, May 2, 2022
8reactions
cceydacommented, May 2, 2022

from js import document, DOMParser, setInterval saw this line in an example so there seems to be a thing, but would have to dig deeper into code. you can maybe get html from document and use a python DOM parser lib. which maybe a weird way to go about it. uncharted territory, much fun!

Read more comments on GitHub >

github_iconTop Results From Across the Web

From pyscript, how can I access the file that I load from html?
And this is the block of code from which I try to access the file but it doesn't work for me. fasta_1 =...
Read more >
Getting started with PyScript
In this document, we'll use the PyScript assets served on https://pyscript.net. ... Let's create a new file called index.html and add the following...
Read more >
PyScript — HTML and Python in Browser | 2022 Tutorial
Importing Python Script from file; Output Python code to HTML Tags ... the libraries from PyScript.net and add them to your project or...
Read more >
Intro to PyScript: Run Python in the browser
Accessing and manipulating HTML elements using PyScript ... Next, create a settings.json file and add the following contents: { "editor.
Read more >
PyScript - Python Application in HTML
You can start using PyScript in HTML just by adding the following two lines between the ... We also use py-env to import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found