Interaction with third party JS (i.e. leafletjs)


I am new to electron and have a problem how electron interact with java script libraries.

Let’s assume I want to extend electron’s hello world application with a leafletjs canvas. Concrete show a map in the index.html.

Leaflet say just add the following to index.html:

<link rel="stylesheet" href="" />
<script src=""></script>
 <div id="map"></div>

Finally set/activate the map via

var map ='map').setView([51.505, -0.09], 13);

I don’t get it how this is called in electron. Furthermore, I want to change coordinates every second. What electron component implement the timer component and how to call the update procedure? I looked in the existing electron projects but I only found really trivial examples or b) to complex examples.


Ok, I found a solution! If you are interested you can take a look at the following code:

This is electron hello world with a integrated leaflet map.