I can't give you an example on how to
do it directly in CEF, because I do not currently have an
environment were I could test it, but here is some JavaScript that
will disable all click actions on anchors and buttons:
document.body.addEventListener('click', function(e) {
if (['A', 'BUTTON'].indexOf(e.target.tagName) !== -1) {
e.preventDefault();
e.stopPropagation();
}
}, true);
This is a very simple way to do it, but there are edge cases were
it doesn't work. For example if the anchor contains another
element which is actually the one being clicked.
If you actually want to disable all buttons visually, you can do
it like that:
Array.prototype.forEach.call(document.querySelectorAll('button'), function(x) {
x.disabled = true;
});
Links can't be visually disabled without using CSS though.