Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 60 lines (40 sloc) 1.536 kb
c72ec1e @douglascrockford first commit
authored
1 <html>
2 <head>
3 <title>ADsafe Widget Template</title>
4 </head>
5 <body>
6
7 Load a minimized copy of adsafe.js from your domain. You can combine
8 it with other js files to minimize HTTP transactions.
9
10 <script src="http://www.ADsafe.org/adsafe.js"></script>
11
12 The widget is given a name that is all uppercase with a trailing
13 underbar. That name is used with ADSAFE.id and ADSAFE.go. It is
14 also used a prefix on the IDs of HTML elements in the widget.
15
16 The widget starts with a div with the widget ID. All of the widget's
17 material must be inside of the div.
18
19 <div id="TEMPLATE_">
20
21 HTML markup required by the widget goes here.
22
23 ADSAFE.id is used to inform ADsafe about the widget. Use of ADSAFE.id
24 is required only if the widget will load library modules.
25
26 <script>
27 "use strict";
28 ADSAFE.id("TEMPLATE_");
29 </script>
30
31 If library modules are required for the widget, load them here.
32
33 <script src="template.js"></script>
34
35 ADSAFE.go starts the execution of the widget.
36
37 <script>
38 "use strict";
39 ADSAFE.go("TEMPLATE_", function (dom, lib) {
40
41 // This is where the code for the widget is placed. It can access
42 // the document through the dom parameter, allowing it indirect
43 // access to html elements, allowing it to change content, styling,
44 // and behavior.
45
46 // Each library file can give itself a name. This script can access
47 // the library file as lib.name.
48
49 });
50 </script>
51
52 The is the end of the widget.
53
54 </div>
55
56 Material that is outside of the div cannot be accessed by the widget.
57
58 </body>
59 </html>
Something went wrong with that request. Please try again.