Opened 7 years ago
Closed 5 years ago
#17789 closed feature (patchwelcome)
dojox/html/styles should expose a function that cleanly removes style sheet nodes
Reported by: | Claude Guyomard | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.13 |
Component: | Dojox | Version: | 1.9.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I think that dojox/html/styles lacks a function that cleanly remove the style sheet nodes that were created dynamically (or not).
Obviously the user can write code such as :
var ssNode = styles.getDynamicStyleSheet(ssName); ssNode && ssNode.parentNode.removeChild(ssNode);
Nevertheless it is not sufficient because dojox/html/styles still hold references (cache) to previously created-or-searched style sheet nodes (vars dynamicStyleMap, pageStyleSheets, titledSheets)
Such a functionality is useful in the context of single-page applications or/and for Destroyable components that own their dynamic stylesheets.
Thanks
Change History (2)
comment:1 Changed 7 years ago by
comment:2 Changed 5 years ago by
Milestone: | tbd → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | new → closed |
Given that no one has shown interest in creating a patch in more than a year, I'm closing this as patchwelcome. Please let us know if you would like to get involved in helping make this change to Dojo!
var ssNode = styles.getDynamicStyleSheet(ssName); / / this gets OR CREATEs must be read var ssNode = styles.getStyleSheet(ssName);