LibWebView: Add context menu support to the Inspector's cookie table

The menu can currently support deleting a specific cookie or all cookies
for the current page.
This commit is contained in:
Timothy Flynn
2024-09-06 13:22:16 -04:00
committed by Andreas Kling
parent 3c5650f846
commit fc809f9755
13 changed files with 73 additions and 0 deletions

View File

@@ -235,6 +235,11 @@ inspector.setCookies = cookies => {
addColumn(row, new Date(cookie.creationTime).toLocaleString());
addColumn(row, new Date(cookie.lastAccessTime).toLocaleString());
addColumn(row, new Date(cookie.expiryTime).toLocaleString());
row.addEventListener("contextmenu", event => {
inspector.requestCookieContextMenu(cookie.index, event.clientX, event.clientY);
event.preventDefault();
});
});
oldTable.parentNode.replaceChild(newTable, oldTable);