#1432 closed defect (invalid)
dojo.style.setStyle working?
Reported by: | Owned by: | Bryan Forbes | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Style | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I've been trying to use dojo.style.setStyle, however it is not being called.
I put an alert inside the beginning of the function to check.
I also made sure it's being loaded, by doing alert(dojo.style.setStyle);
Here's the really weird thing.
The alert shows the setStyle code, however the alert I put in is not there.
So just to make sure I setup the path right in the page, I put an alert inside dojo.collections.Dictionary as well, and created a new dictionary.
The alert triggered.
Any ideas?
Attachments (1)
Change History (6)
Changed 14 years ago by
Attachment: | testStyle0.html added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
severity: | minor → major |
---|
OK - After trying just about every trick I could think of, I finally decided to make it real simple and just delete everything in style.js and just have an alert there, like this:
alert('loading');
Still nothing.
So, I copy style.js and name it mink.js and I change
dojo.provide('dojo.style')
to
dojo.provide('dojo.mink')
Then I require dojo.mink in the test page.
Now I get the alert.
So there must be some dojo.style loading thing going on in one of the initial files that dojo loads...bootstrap.js, etc.
Here are my system parameters:
Running on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc3 Firefox/1.0.7
comment:3 Changed 14 years ago by
Milestone: | → 0.4 |
---|---|
Owner: | changed from anonymous to Bryan Forbes |
comment:4 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
The 0.4 release moves the setStyle method into html proper; you'll need to call dojo.html.setStyle(node, classname) as opposed to dojo.style.setStyle.
Aside from the idea that setStyle will break if you try to pass it no arguments, I don't see any reason why your code won't work as is. Please take a pass with it with the 0.4 HEAD, make the change to dojo.html.setStyle, and see if that works for you.
I attached the test file.
Note I just tried dojo.style.setStyle()
without any arguments because I just want the alert to be triggered.