JS.Packages file().styling()

28 views
Skip to first unread message

Anthony

unread,
Apr 2, 2012, 6:00:51 PM4/2/12
to jsclass-users
I was browsing James Coglan's blog and I noticed this:

file('./lib/test.js')
.provides('JS.Test')
.requires('JS.Module', 'JS.Class', 'JS.Console', 'JS.DOM',
'JS.Enumerable', 'JS.SortedSet',
'JS.Comparable',
'JS.StackTrace')
.styling('./lib/assets/testui.css');

That 'styling()' call has me curious. Is that documented anywhere?
What does it do exactly?

James Coglan

unread,
Apr 2, 2012, 6:06:21 PM4/2/12
to jsclas...@googlegroups.com
It loads the named CSS file when that package is downloaded. It works in browsers, AIR, and XULRunner. 



--
James Coglan
http://jcoglan.com
+44 (0) 7771512510

Anthony

unread,
Apr 2, 2012, 6:09:07 PM4/2/12
to jsclas...@googlegroups.com
Does it add a <link> tag to the page? Before or after the script?

James Coglan

unread,
Apr 2, 2012, 6:13:49 PM4/2/12
to jsclas...@googlegroups.com
On 2 April 2012 23:09, Anthony <draft...@gmail.com> wrote:
Does it add a <link> tag to the page? Before or after the script?

Anthony

unread,
Apr 2, 2012, 6:19:00 PM4/2/12
to jsclas...@googlegroups.com
Great, thanks very much.
Reply all
Reply to author
Forward
0 new messages