Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Table with dash in id is not working #155

Closed
tduchateau opened this issue Jan 28, 2014 · 1 comment
Closed

[CLOSED] Table with dash in id is not working #155

tduchateau opened this issue Jan 28, 2014 · 1 comment

Comments

@tduchateau
Copy link
Member

Issue by KonstantinGrigoriev from Wednesday Jun 12, 2013 at 20:29 GMT


<table id="some-table-id" dt:table="true">
...

This will raise an error in browser:
Uncaught SyntaxError: Unexpected token -

Problem is that generated variable name contains dash:

var oTable_some-table-id;
var oTable_some-table-id_params = {

Dash naming style convention for identifiers is very common in web-dev, maybe, its better to replace or remove dash during code generation.

@tduchateau
Copy link
Member Author

Comment by tduchateau from Monday Jun 24, 2013 at 13:23 GMT

To be more precise, the chosen id should be processed in order to remove all characters that are incompatible for a Javascript variable.

Thanks for your feeback.

Regards,
Thibault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant