#956 closed task (fixed)
make dojo.body(): document.body doesn't work for XHTML, and dojo.html.body causes circular dependencies
Reported by: | bill | Owned by: | liucougar |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
document.body doesn't work on XHTML documents, so the code should be changed to call dojo.html.body() ...
xcept for the fact that it creates circular dependencies / unwanted dependencies.
Ex: DomWidget?.js and style.js both reference document.body
Attachments (3)
Change History (13)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Milestone: | → 0.4 |
---|---|
Summary: | use dojo.html.body() rather than document.body → make dojo.body(): document.body doesn't work for XHTML, and dojo.html.body causes circular dependencies |
Note that document.body is referenced from hostenv_browser.js and event/browser.js.
hostenv_browser.js shouldn't be referencing dojo.html, so it should be renamed/moved to dojo.body().
Changed 16 years ago by
Attachment: | body.patch added |
---|
comment:3 Changed 16 years ago by
Owner: | changed from alex to liucougar |
---|---|
Status: | new → assigned |
added patch to move dojo.html.body() to dojo.body()
Changed 16 years ago by
Attachment: | body.2.patch added |
---|
Changed 16 years ago by
Attachment: | body-core.patch added |
---|
comment:4 Changed 16 years ago by
OK, checked in body-core.patch and body.2.patch in [4525]. Thanks for the patch.
Leaving the bug open because there are still some places in the code that reference document.body directly, but shouldn't.
comment:5 Changed 16 years ago by
committed r4569
remaining document.body is in src/widget/Editor2.js, src/widget/RichText.js and src/widget/Editor2Toolbar.js, which I will work on later
so I'd like to close this bug, any objections?
comment:6 Changed 16 years ago by
So every explication of why dojo.html.body() causes "circular dependency problems" have turned out to be bullshit in one way or another. I want a clear explanation of why we can't use it before we close this ticket.
comment:7 Changed 16 years ago by
Alex - hostenv_browser.js references dojo.body(). Doesn't that count as a circular dependency? Also, style.js references it.
LiuCougar? - it's fine w/me if you close the bug.
comment:8 Changed 16 years ago by
it's a freaking one liner! just have it in both places. This patch doesn't make sense.
Regards
comment:9 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
You know, I *thought* this was the case, which is why we added it in the first place...