skip to Main Content

Html – Why won't this program display correctly?

I have this HTML page which is meant to display a to-do list and allow users to add tasks to it <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>To-Do List</title> <link rel="stylesheet" href="styles.css"> <script src="/todolist.js" defer></script> </head> <body> <a href="index.html">Homepage</a>…

VIEW QUESTION

Html – Missing pointerup event in child element after setting pointerCapture on parent

I want to implement a drag effect on an element, so I used setPointerCapture in its pointerdown event handler like this: ele.addEventListener('pointerdown', (e)=>{ e.currentTarget.onpointermove = dosomething() e.currentTarget.setPointerCapture(e.pointerId) }) ele.addEventListener('pointerup', (e)=>{ e.currentTarget.onpointermove = null e.currentTarget.releasePointerCapture(e.pointerId) }) However, I run into problems…

VIEW QUESTION
Back To Top
Search