Permalink
Browse files

Clarification

  • Loading branch information...
douglascrockford committed Aug 31, 2011
1 parent 4e434e9 commit 09c5b49e0346fba5f8dc927d3a3bc91371cf1656
Showing with 9 additions and 7 deletions.
  1. +8 −6 template.html
  2. +1 −1 template.js
View
@@ -3,9 +3,9 @@
<title>ADsafe Widget Template</title>
</head>
<body>
-<p>View source</p>
+<p>This is the page that will contain the widget.</p>
- Load a minimized copy of adsafe.js from your domain. You can combine
+ Load a minifed copy of adsafe.js from your domain. You can combine
it with other js files to minimize HTTP transactions.
<script src="http://www.yourTrustedDomain.../adsafe.js"></script>
@@ -32,28 +32,30 @@
<script src="template.js"></script>
- ADSAFE.go starts the execution of the widget.
+ ADSAFE.go is passed a function that starts the execution of the widget.
+ This is required for all widgets.
<script>
ADSAFE.go("TEMPLATE_", function (dom, lib) {
- "use strict";
+ 'use strict';
// This is where the code for the widget is placed. It can access
// the document through the dom parameter, allowing it indirect
// access to html elements, allowing it to change content, styling,
// and behavior.
// Each library file can give itself a NAME. This program can access
-// the library file as lib.NAME.
+// the library file as lib.NAME. See template.js.
});
</script>
- The is the end of the widget.
+ This the end of the widget.
</div>
Material that is outside of the div cannot be accessed by the widget.
+ A page could contain many ADsafe widgets.
</body>
</html>
View
@@ -4,7 +4,7 @@
// object that the widget can use.
ADSAFE.lib("template", function () {
- "use strict";
+ 'use strict';
// This is where the code for the library module is placed. It cannot
// access the document unless the guest code passes the dom parameter

0 comments on commit 09c5b49

Please sign in to comment.