Opened 6 years ago

Closed 4 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 6 years ago by Claude Guyomard

var ssNode = styles.getDynamicStyleSheet(ssName); / / this gets OR CREATEs must be read var ssNode = styles.getStyleSheet(ssName);

comment:2 Changed 4 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

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!

Note: See TracTickets for help on using tickets.