Hacker News new | ask | show | jobs
by postalrat 1860 days ago
Another thing browsers should not allow the page to override.
1 comments

You need it for google docs, etc to intercept paste events and do the right thing from the perspective of a document editor.

But this also illustrates the fact that "useful" browser features can be trivially abused.

That's an interesting point. I could see the feature looking like:

- Allowing a page to intercept a paste.

- If the page doesn't modify the DOM in response, then override it and actually paste the content.

Still trivial to bypass.
Maybe, but it might block the common case of "well intentioned developer breaks the built-in functionality without realizing it".
Is that really a common case when paste is disabled? I can't recall ever coming across it where it wasn't obvious that it was intentional.
That may be true. Maybe instead we could have a menu like

- Copy

- Paste

- No, really, paste the darn text