You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to access a javscript library whose name includes '-'? #903
I am trying to integrate a Javascript library whose name is 'babylon-htmlmesh'. As you can see, the name of the library includes '-' character. I found that Transcrypt mistranslated it adding a space character to both sides of '-' character.
python .py file:
api = __pragma__('js',
'{}',
'babylon-htmlmesh;'
)
Transcrypted .js file:
export var api = babylon - htmlmesh;
Note that '-' became ' - ' after Transcrypted above.
Because of the added spaces, Javascript raises an error.
How can I access a javscript library whose name includes '-' in Transcrypt?
changed the title [-]How to access a javscript library who name includes '-'?[/-][+]How to access a javscript library whose name includes '-'?[/+]on Jul 24, 2025
api = __pragma__('js',
'{}',
#'babylon-htmlmesh;' # CAUTION: '-' is Transcrypted to ' - ' raising an error in Javacript
'window["babylon-htmlmesh"];'
)
Activity
[-]How to access a javscript library who name includes '-'?[/-][+]How to access a javscript library whose name includes '-'?[/+]warrenchopin commentedon Jul 24, 2025
I found a way: