Tag Archives: dom

Playing random videos using HTML5

Questions: I have written a python script which will send and receive data from server. The server sends a video URL in JSON format which is saved in a JSON file, which will be played by using a HTML5 video player. The URL received from the server are at all times random. How should I… Read More »

Background color working in HTML DOM but not in <style>

Questions: I would like to set the background color of an h2 in <style> so that it can have an h2:hover as well. Here is my code: <template> <div> <h1>Services</h1> <div v-for=”service in services”> <h2>Service: {{ service.id }}</h2> </div> </div> </template> <style> h2 { background: darkseagreen; color: white; } h2:hover { cursor: pointer; background: mediumseagreen;… Read More »

JavaScript loop random pick from array

Questions: I am having a problem with this. I want to pick random word from an array everytime the popup loads. But the word doesn’t change. I always get results as: (march, march, march.. january, january, january, january, january)… It just pick the random month and then uses it every loop. I want to make… Read More »

Error while truing to make audio call with js, elixir and https (Uncaught (in promise) DOMException: Error processing ICE candidate)

Questions: I’m learning low to create video/audio chat with https protocol, under next link you can find what I have so far: https://kurslab.com/test/audiocall/. I open two tabs in one browser (mostly I use Opera), one in normal mode (https://kurslab.com/test/audiocall/alpha), second in private mode (https://kurslab.com/test/audiocall/beta), then I log in on both pages and call from beta… Read More »

How does DOMContentLoaded relate to Web Components?

Questions: It’s age-old common sense to start manipulating the DOM only once it’s ready and we can be certain all the elements are available, and in the post-jQuery days we’re all using the DOMContentLoaded event for this. Now web components (especially in the form of autonomous custom elements) tend to create their own HTML, usually… Read More »