Opened 10 years ago
Closed 10 years ago
#11871 closed defect (invalid)
Current custom data-* prefix parser has some degradation
Reported by: | youngho | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Parser | Version: | 1.5 |
Keywords: | Parser | Cc: | |
Blocked By: | Blocking: |
Description
Current custom data-* prefix parser has some degradation. Please refer to the attached test file.
when run test file, I got
missing : after property id http://localhost/js/dojo-src/dojo/tests/parser_fail.html Line 19
Attachments (3)
Change History (15)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Right, please reopen if there's still an issue after fixing the quotes.
data-dojo-props and data-dojo-types also need quotes or otherwise it's a subtraction of three variables.
comment:3 Changed 10 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Sorry I should be reopen again,
After fixing the typo data-dojo-props: "... ", Still it doesn't work at all.
comment:6 Changed 10 years ago by
Your test file is still invalid, as I said above data-dojo-props and data-dojo-types also need quotes or otherwise it's a subtraction of three variables.
comment:7 Changed 10 years ago by
Hello Bill,
Sorry for missing your comment. I updated again my test file.
comment:8 Changed 10 years ago by
Owner: | changed from bill to dante |
---|---|
Status: | reopened → new |
OK that's better, it's syntactically valid javascript. But from the code it looks like instantiate() expects a hash for it's mixin parameter like:
this.instantiate(myNodes, { "data-dojo-type": "dijit.form.Button", intParam: 5, stringParam: "hi" })
As to what API makes sense, that's up for debate. Is the above API inconvenient for you? It does seem weird compared to how parser works declaratively.
comment:9 Changed 10 years ago by
Also in IE8, the custom className didn't set at all. With FF, I can see the custom class name on the widget, but IE8 it didn't.
I attached another test file for that.
Changed 10 years ago by
Attachment: | parser_fail_IE8.html added |
---|
IE8, the custom class name didn't set at all
comment:10 Changed 10 years ago by
That test is invalid because it's using "className" instead of "class" (note that you need quotes around "class" since it's a reserved word"), but if you still have problems after fixing that please open a new ticket about it.
comment:11 Changed 10 years ago by
I confirme test parser_fail_IE8.html is wrong. After bill's suggestion applied, IE8 works correctly.
comment:12 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Looks like you are mixing single and double quotes on line 20 in the test file.
data-dojo-props:'onClick:function(){ console.log("clicked simple"); }, iconClass: 'plusIcon', value: 'Create' "should be: