When using the Diagram.addTo() method in railroad.js without specifying a target element, the method cannot determine the correct <script> tag if the tag has type=module coded. This is because ES Module scripts, even in-line ones, are forced to be <script defer>, causing them to be run out of order, making the code that locates the <script> tag locate the wrong one.
When using the
Diagram.addTo()
method inrailroad.js
without specifying a target element, the method cannot determine the correct<script>
tag if the tag hastype=module
coded. This is because ES Module scripts, even in-line ones, are forced to be<script defer>
, causing them to be run out of order, making the code that locates the<script>
tag locate the wrong one.