Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 954 Bytes

File metadata and controls

28 lines (16 loc) · 954 Bytes

Project will move to github. Find this wiki page at the new address: https://github.com/cztomczak/cefpython/wiki/ContentFilterHandler


ContentFilterHandler callbacks

See the ContentFilter object.

You must keep a strong reference to the ContentFilterHandler object, otherwise it gets destroyed and callbacks are not called, CEF Python keeps only a weak reference to this object.

CEF 1

The methods of this handler will always be called on the UI thread.

void OnData(str data, StreamReader substitute_data)

Set |substitute_data| to the replacement for the data in |data| if data should be modified.

void OnDrain(StreamReader remainder)

Called when there is no more data to be processed. It is expected that whatever data was retained in the last OnData() call, it should be returned now by setting |remainder| if appropriate.