Can I block a specific href in a webbrowser

I have tried adding a className flow1 and using css but this is ignored

.flow1 {
pointer-events: none;
color: #999; /* Change color to gray */
}

I also tried

procedure TForm10.WebBrowserControl1Load(Sender: TObject; AEvent: TJSEvent);
var
Script: string;
begin
// JavaScript code to block links within elements with class "flow1"
asm
var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {links[i].style.pointerEvents = 'none';}
end;
end;

Do you insert this in the context of the webbrowser itself (i.e. FRAME HTML element used for it)?

Sorry I don't understand your question.

Please make the question more precise.
I understand from your description you use a TWebBrowserControl and want to influence somehow hyperlinks in the content of this TWebBrowserControl.
If this is not the case, please describe what you want to do in more detail.

Yes I need initially block all the hyperlinks in the TWebBrowserControl. Then if working then block a specific hyper link.

Cheers

SteveW

This needs to be set from the content of what you load into this TWebBrowserControl.
From outside the frame (TWebBrowserControl), this cannot be done for this reason: Cross Frame Scripting | OWASP Foundation