@ohhwells/bridge 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3927,7 +3927,10 @@ function OhhwellsBridge() {
|
|
|
3927
3927
|
if (timer !== void 0) {
|
|
3928
3928
|
clearTimeout(timer);
|
|
3929
3929
|
autoSaveTimers.current.delete(key);
|
|
3930
|
-
|
|
3930
|
+
}
|
|
3931
|
+
const html = sanitizeHtml(el.innerHTML);
|
|
3932
|
+
const original = originalContentRef.current ?? "";
|
|
3933
|
+
if (html !== sanitizeHtml(original)) {
|
|
3931
3934
|
postToParentRef.current({ type: "ow:change", nodes: [{ key, text: html }] });
|
|
3932
3935
|
const h = document.documentElement.scrollHeight;
|
|
3933
3936
|
if (h > 50) postToParentRef.current({ type: "ow:height", height: h });
|