Opened 11 years ago
Closed 7 years ago
#7567 closed defect (invalid)
dojox.html._ContentSetter should evaluate scripts prior to the call of the super class method
Reported by: | Achim Klotz | Owned by: | Sam Foster |
---|---|---|---|
Priority: | high | Milestone: | future |
Component: | Dojox | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
in the current version the method "onBegin" first calls the method of the super class and then does the adaptions of styles and script.
But I think a least the script should be done prior to the call of the super class method (only of the type "text/javascript" are relevant here).
Otherwise it's not possible to declare function in inline script tags or external script file which than can be used in "dojo/method" script blocks.
example:
<script type="text/javascript"> function doSomething() { alert('foo');} </script> <button dojoType="dijit.form.Button" label="Test Button"> <script type="dojo/method"> this.onClick = doSomething; </script> </button>
If you are placing the code example above into a dojox.layout.ContentPane? you'll get an error because during the evaluation of the dojo/method script block the method "doSomething" is unknown
Change History (7)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Owner: | changed from Adam Peller to Sam Foster |
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Status: | new → assigned |
---|
comment:4 Changed 11 years ago by
(In [15174]) Refs #7567 Moves call to inherited onEnd (dojo.html._ContentSetter onEnd calls dojo.parser.parse in the parseContent:true scenario) to after the renderStyles, evalScripts stuff. Adds a unit test to confirm execution order, which should be: eval'd scripts, dojoType parsing, and then any dojo/method execution. This test passes in FF, but currently fails in IE, which doesnt find the dojo/method block. I'm investigating... !strict
comment:6 Changed 11 years ago by
Milestone: | 1.3 → future |
---|
Moving to 'future' I'm not going to have time to look at this in the short-term
comment:7 Changed 7 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
OK, it’s been five years and this is not fixed and there do not seem to be a whole lot of complaints. There is no test case on this so I am going to just mark it as invalid for now. If someone can confirm this is actually still an issue, provides a testcase, AND this package does not turn out to be abandoned for 2.0, we’ll see how it goes.
it's not in the "onBegin" but in the "onEnd" method. The
block (line 292) should be called prior to the super method call