Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/coconut/vdom/Renderer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ private class DomCursor extends Cursor<Node> {
function lostNode(index:Int, count:Int, node:Null<Node>):String
return 'assert: node ${index + 1}/$count to delete under ${describe(parent)} (in ${ancestors(parent)}) '
+ (if (node == null) 'is missing' else 'is ${describe(node)}, now under ${describe(node.parentNode)}')
+ (if (document.documentElement.className.indexOf('translated-') > -1) ', page translated' else '');
+ (if (isTranslated()) ', page translated' else '');

static function isTranslated():Bool
return document.documentElement.className.indexOf('translated-') > -1 // Google Translate
|| document.querySelector('[_msthash]') != null; // Microsoft Translator (Edge) marks the elements it translated

static function describe(n:Null<Node>):String {
if (n == null) return 'nothing';
Expand Down
Loading