Write to Textarea


Hello, I’m new to Elctron and already Like it!

I have already an small app that scrapes something, anyway what I would like to know how to implement this in my Electron app, So how my JavaScript is talking to HTML?

What I want is Output text I get from my Script in a textarea, As far as I understand Electron works with HTML/CSS

Now the textarea in HTML is:


At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.

I get the text for now in the console with console.log('some text');

How do I get this in my Electron app How to talk to my Textarea?

I know this is a really Basic question…but I have no Idea! Thank you


You do it in the same way you do it with a normal web site. First, you want to give your textarea a unique id attribute, and then you use document.getElementById() from your JavaScript to obtain the element and manipulate it.


Ok I think I understand, so first I need to Call my scraper.js in the index.html where my textarea is and then in the scraper.js manipulate with document.getElementById()

Intresting Thank you, I need to find some good courses on Manipulating DOM.