Skip to content

Commit ee62a80

Browse files
committed
Add readme section about features
1 parent a83bab0 commit ee62a80

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ exist in a single place within a DNN site, instead of every module, skin, and
77
piece of content that wants to include them using their own. DNN presently
88
comes with libraries for jQuery, jQuery UI, jQuery Migrate, Knockout, and
99
Knockout Mapping.
10+
1011
In addition to these built-in libraries, new libraries can be installed into
1112
DNN, and used by various components. DNN allows multiple versions of a
1213
JavaScript library to be used, so one module can request a particular version
1314
of a script, while another requests another. So long as they aren't on the same
1415
page, they will get what they requested; otherwise, DNN will use the higher
1516
version.
1617

18+
1719
Goal
1820
===============
1921

@@ -79,13 +81,30 @@ a value indicating how specific the version is, as a value of the
7981
argument, `Exact` is the behavior of the overload with two arguments, while the
8082
other two values allow you to get behavior that is in between strict and loose.
8183

82-
When requesting that a JavaScript Library is registered, this will ensure that
83-
it, and any of its dependencies, get included on the page.
8484

85+
JavaScript Library Features
86+
===============
8587

88+
When requesting that a JavaScript Library is registered, DNN ensures that
89+
both that library's JavaScript file and all of its dependencies' JavaScript
90+
files, get included on the page. The JavaScript library itself will define the
91+
properties that determine how the file is included on the page. Specifically,
92+
the library will indicate its preferred location (from page head, body top, and
93+
body bottom), and can provide a URL to the script on a
94+
<abbr title="Content Distribution Network">CDN</abbr> (along with a JavaScript
95+
expression to use to verify that the CDN loaded the script correctly, so that
96+
DNN can fallback to the local version if the CDN is down). The site
97+
administrator
98+
99+
The other main feature that JavaScript Libraries give you is de-duplication of
100+
scripts. This means that if your module and your skin both request the
101+
[html5shiv library](http://www.dnnsoftware.com/forge/html5shiv), it only gets
102+
included on the page once (rather than both components including their own
103+
version of the script). Likewise, if both components request different versions
104+
of the script, just the higher version will be included.
86105

87106
License
88-
=================
107+
===============
89108

90109
This code is released under the [MIT license](LICENSE.md).
91110
However, the individual libraries are licensed by their respective owners.

0 commit comments

Comments
 (0)