ckeditor5-react
ckeditor5-react copied to clipboard
Option to disable watchdog on <CKEditorContext>
Similar to #373, it would be great if we could disable watchdog on the <CKEditorContext>
component, so that there's no context watchdog running.
As an example, watchdog was scanning 100k unique objects (over 400k references to those objects) and then generating errors, because some of those objects are a Proxy
that handle get
and throw if a key is unexpected. Since this happens during _create
, it fails to initialize altogether.
(It does this when it calls getSubNodes
)
https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-watchdog/src/utils/getsubnodes.ts
As a workaround, I use this:
<CKEditorContext context={ContextWithoutWatchdog} ... > ... </CKEditorContext>
And this class:
export class ContextWithoutWatchdog extends Context {
public _watchdogExcluded = true;
}
@pomek is this something you could plan?
As an example, watchdog was scanning 100k unique objects (over 400k references to those objects) and then generating errors, because some of those objects are a
Proxy
that handleget
and throw if a key is unexpected. Since this happens during_create
, it fails to initialize altogether.
Interesting case, fyi @DawidKossowski as you were spending some time with Watchdog recently.