In order to workaround the parsing error the key needs to be quoted twice, like this:
attr: {
'"data-something"': 'propname'
}
This pull request eliminates the need to twice quote non-identifier keys, allowing them to be written more naturally as in the first example above, without resulting in a parsing error. Keys that are already twice quoted will continue to work so any existing code that already uses the workaround can be left as is.
When using object literal notation where keys are non-identifiers, the keys are typically quoted like this:
However, with binding object notation, this results in a parsing error:
In order to workaround the parsing error the key needs to be quoted twice, like this:
This pull request eliminates the need to twice quote non-identifier keys, allowing them to be written more naturally as in the first example above, without resulting in a parsing error. Keys that are already twice quoted will continue to work so any existing code that already uses the workaround can be left as is.