It's really hard to understand how an editable web app does not work on Firefox because such app does complicated things with minified JS code.

When I investigate what's going on, I used C++ debugger and add break point to related paths in `|HTMLEditor|`. However, it requires to build a debug build by yourself and anyway hard to check when unexpected mutations occurred.

For helping developers to debug the editable web apps in the world, now, `|HTMLEditor|` has new 2 log modules, `|HTMLEditorMutation|` <https://searchfox.org/firefox-main/rev/e2cbda2dd0f622553b5c825f319832db4863f6a4/editor/libeditor/HTMLEditorMutationObserver.cpp#40-46> and `|HTMLEditorAttrMutation|` <https://searchfox.org/firefox-main/rev/e2cbda2dd0f622553b5c825f319832db4863f6a4/editor/libeditor/HTMLEditorMutationObserver.cpp#94-100> and they are available in release builds too. The former is for the DOM node level mutations and the latter is for the attribute mutations of `|Element|` node. They can log mutations only unexpected one in editable nodes with `|3|` <https://searchfox.org/firefox-main/rev/e2cbda2dd0f622553b5c825f319832db4863f6a4/editor/libeditor/HTMLEditorMutationObserver.cpp#60-61,64,66-67,71,73,75,77,79,81,84-85,87,112,115,117-118,120,123>, log any mutations only in editable nodes with `|4|` <https://searchfox.org/firefox-main/rev/e2cbda2dd0f622553b5c825f319832db4863f6a4/editor/libeditor/HTMLEditorMutationObserver.cpp#61,64,66-67,71-73,75-77,79-81,84-87,112,115,117-118,120-123> and log all mutations in the document with `|5|`.

`|MOZ_LOG=HTMLEditorMutation:3,sync|` should be enough for usual investigation of editable web apps because web-compat issues of editable web apps are usually caused by mutations of editable nodes by the web app.

Unfortunately, the log is plaintext, so, it may be difficult to read the related DOM nodes because they are printed with a full path in the DOM tree. So, I recommend to read the log within a text editor and replace the path above the relevant editing host with empty string.

--
Masayuki Nakano<masay...@d-toybox.com>
Working on DOM, Events, editor and IME handling for Gecko

--
You received this message because you are subscribed to the Google Groups 
"dev-platform@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dev-platform+unsubscr...@mozilla.org.
To view this discussion visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/6aaf6740-9613-403f-ace9-d15521887dd4%40d-toybox.com.

Reply via email to