Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Best practices
0 votes
9 replies
153 views

In a Sveltekit app, I'm listening for window.addEventListener('online') and window.addEventListener('offline') so as to warn the user. I only need to add the event listener at app start. Add to app....
Score of 0
2 answers
67 views

When handling the beforeinput event, how do I determine the range affected by an inputType of "deleteWordForward" or "deleteWordBackward"? These occur when the user does ctrl+...
Advice
1 vote
3 replies
101 views

I'm working on my own extension based on professor prebid. Idea is to collect data from professor, group it in one big, structurized object, remake it as string, and send at openAI API for "...
Score of 0
0 answers
51 views

class Editor { docContainer text constructor(posContainer) { this.posContainer = posContainer this.genComponets() this.listen() } genComponets() { ...
Score of 4
3 answers
399 views

Example 1 - No focus outline for link I have a keydown handler for a <textarea>. When the handler gets invoked, I want a link (<a> tag) to receive focus. If you run the example below, ...
Score of 0
0 answers
249 views

I am getting an intermittent exception in the console from the DOM: Uncaught (in promise) Error: System.InvalidOperationException: JavaScript interop calls cannot be issued at this time. This is ...
Score of 0
2 answers
202 views

when user turns on his laptop, I am trying to check user's last activity time on mounted in vuejs3, i am using below code for it: document.addEventListener('visibilitychange', () => { if (...
Score of 0
2 answers
158 views

Imagine a website that has infinite scrolling, where a link saying download, appears underneath every post. I would like to change from a word to something else of anything else. (In my case a 24x24 ...
Score of 1
1 answer
192 views

I am using AngularJS SPA and trying to alert users when they are about to navigate away from active form. There are 2 parts for this: User closes active tab User clicks internal link to navigate So ...
Score of -2
1 answer
86 views

This is my HTML code. <div class="buttons-div"> <button class="modulo-button" id="btn" value="%">%</button> <button class="division&...
Score of 0
1 answer
198 views

I am trying to create random shaped polygons inside svg. I want to implement the functionality to drag the polygons within the svg. To do this, I want to capture double click and hold event, similar ...
Score of 1
1 answer
123 views

I'm using a React input element that has both onChange and onBlur handlers. In the onChange, I'm updating a state. Then, in onBlur, I need to use the updated value of that state. I want to make sure ...
Score of 1
1 answer
262 views

This might be my own stupidity, but I have been struggling with this problem for the last day or so and I am not sure how to troubleshoot it anymore. Short Version I have the following Code in Blazor &...
Score of 0
2 answers
134 views

I have just started learning JavaScript. I am creating a ToDo app. Whenever I click on Add Task button the myFunction which I created is not working as it is supposed to. Whenever the button is ...
Score of 0
2 answers
95 views

I'm implementing a pan-zoom functionality in JavaScript where users can pan and zoom an iframe. The implementation works well when the zoom level is above 0.5 (50%), but when zooming out below 0.5, ...

15 30 50 per page
1
2 3 4 5
835