ArtPoon / BelleJS

Generate BEAST XML analysis files using a BEAUTI-like JavaScript interface
MIT License
2 stars 0 forks source link

Interface throws error when attempting to make XML a second time #7

Closed ArtPoon closed 3 years ago

ArtPoon commented 3 years ago
Failed to locate branchRates element in rateStatistic
GopiGugan commented 3 years ago

I think the the issue here is because "If the given child is a reference to an existing node in the document, appendChild() moves it from its current position to the new position" (https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild). So we need to use cloneNode() when we want to reuse an element (e.g. dbr in updateBranchRates())