Help get this topic noticed by sharing it on Twitter, Facebook, or email.

ID and other attributes on addInlineCSS and addRemoteCSS

Topic says it all. Basically allowing optional ID (and other attribute values) to inline and remote css.
Possibly also for inlineJS and remoteJS.

Example:

appAPI.dom.addInlineCSS('css.css',{id:'Id','attr':'somevalue'})

Which would render as:

<link type="text/css" href="css.css" rel="stylesheet" id="Id" attr="somevalue">


This would be really really handy when working with ajax and stuff, dynamically inserting css, and either removing it again on-demand or making sure not reinsert the same css a second time.
This can only be done by somehow distinguishing the inserts, which is currently impossible without being able to add some kind of distinguishable attribute.
Also with possibility to "override" rel and type, using this attribute object.

Should be simple to add, and hopefully quickly :) I'm in STRONG need of this :)..
1 person likes
this idea
+1
Reply