1 | <!DOCTYPE html>
|
2 |
|
3 | <html lang="en">
|
4 | <head>
|
5 | <meta charset="utf-8">
|
6 | <meta name="viewport" content="width=device-width">
|
7 | <title>CrossBrowdy API documentation Namespace: Fetch</title>
|
8 |
|
9 | |
10 |
|
11 |
|
12 | <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
13 |
|
14 | <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
|
15 |
|
16 | </head>
|
17 |
|
18 | <body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
19 |
|
20 | <div class="navbar navbar-default navbar-fixed-top ">
|
21 | <div class="container">
|
22 | <div class="navbar-header">
|
23 | <a class="navbar-brand" href="index.html">CrossBrowdy API documentation</a>
|
24 | <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
25 | <span class="icon-bar"></span>
|
26 | <span class="icon-bar"></span>
|
27 | <span class="icon-bar"></span>
|
28 | </button>
|
29 | </div>
|
30 | <div class="navbar-collapse collapse" id="topNavigation">
|
31 | <ul class="nav navbar-nav">
|
32 |
|
33 | <li class="dropdown">
|
34 | <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
|
35 | <ul class="dropdown-menu inline">
|
36 | <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li>
|
37 | </ul>
|
38 | </li>
|
39 |
|
40 | <li class="dropdown">
|
41 | <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
|
42 | <ul class="dropdown-menu inline">
|
43 | <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
|
44 | </ul>
|
45 | </li>
|
46 |
|
47 | <li class="dropdown">
|
48 | <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
|
49 | <ul class="dropdown-menu inline">
|
50 | <li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li><li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li>
|
51 | </ul>
|
52 | </li>
|
53 |
|
54 | </ul>
|
55 |
|
56 | <div class="col-sm-3 col-md-3">
|
57 | <form class="navbar-form" role="search">
|
58 | <div class="input-group">
|
59 | <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
|
60 | <div class="input-group-btn">
|
61 | <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
|
62 | </div>
|
63 | </div>
|
64 | </form>
|
65 | </div>
|
66 |
|
67 | </div>
|
68 |
|
69 | </div>
|
70 | </div>
|
71 |
|
72 |
|
73 | <div class="container" id="toc-content" style="width:100%;">
|
74 | <div class="row" style="width:100%;">
|
75 |
|
76 |
|
77 | <div class="col-md-8" style="width:85%;">
|
78 |
|
79 | <div id="main">
|
80 |
|
81 |
|
82 |
|
83 | <h1 class="page-title">Namespace: Fetch</h1>
|
84 |
|
85 | <section>
|
86 |
|
87 | <header>
|
88 |
|
89 | <h2>
|
90 | <span class="ancestors"><a href="CB_Net.html">CB_Net</a>.</span>
|
91 |
|
92 | Fetch
|
93 | </h2>
|
94 |
|
95 |
|
96 | </header>
|
97 |
|
98 |
|
99 | <article>
|
100 | <div class="container-overview">
|
101 |
|
102 |
|
103 | <div class="description"><p>Static class to manage things related to the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a>. It will return itself if it is tried to be instantiated.</p></div>
|
104 |
|
105 |
|
106 |
|
107 | <dl class="details">
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
138 | <dd class="tag-source">
|
139 | <ul class="dummy">
|
140 | <li>
|
141 | <a href="CrossBase_net_fetch_CB_Net_Fetch.js.html">CrossBase/net/fetch/CB_Net_Fetch.js</a>,
|
142 | <a href="CrossBase_net_fetch_CB_Net_Fetch.js.html#sunlight-1-line-15">line 15</a>
|
143 | </li>
|
144 | </ul>
|
145 | </dd>
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 |
|
153 | </dl>
|
154 |
|
155 |
|
156 |
|
157 |
|
158 | </div>
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 | <h3 class="subsection-title">Methods</h3>
|
174 |
|
175 | <dl>
|
176 |
|
177 | <hr>
|
178 | <dt>
|
179 | <h4 class="name" id=".get"><span class="type-signature"><static> </span>get<span class="signature">(resource [, init])</span><span class="type-signature"> → {Promise}</span></h4>
|
180 |
|
181 |
|
182 | </dt>
|
183 | <dd>
|
184 |
|
185 |
|
186 | <div class="description">
|
187 | <p>Function that points to the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch</a> method. If the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a> is not supported natively, the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch</a> function will be a polyfill.</p>
|
188 | </div>
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 | <h5>Parameters:</h5>
|
198 |
|
199 |
|
200 | <table class="params table table-striped">
|
201 | <thead>
|
202 | <tr>
|
203 |
|
204 | <th style="width:12%; min-width:110px;">Name</th>
|
205 |
|
206 |
|
207 | <th style="width:12%; min-width:110px;">Type</th>
|
208 |
|
209 |
|
210 | <th style="width:12%; min-width:110px;">Argument</th>
|
211 |
|
212 |
|
213 |
|
214 |
|
215 | <th class="last" style="min-width:310px;">Description</th>
|
216 | </tr>
|
217 | </thead>
|
218 |
|
219 | <tbody>
|
220 |
|
221 |
|
222 | <tr>
|
223 |
|
224 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>resource</code></td>
|
225 |
|
226 |
|
227 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
228 |
|
229 |
|
230 | <span class="param-type">string</span>
|
231 | |
|
232 |
|
233 | <span class="param-type">Request</span>
|
234 |
|
235 |
|
236 |
|
237 |
|
238 | </td>
|
239 |
|
240 |
|
241 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
242 |
|
243 |
|
244 |
|
245 |
|
246 |
|
247 | </td>
|
248 |
|
249 |
|
250 |
|
251 |
|
252 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>First parameter of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch</a> method.</p></td>
|
253 | </tr>
|
254 |
|
255 |
|
256 |
|
257 | <tr>
|
258 |
|
259 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>init</code></td>
|
260 |
|
261 |
|
262 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
263 |
|
264 |
|
265 | <span class="param-type">Object</span>
|
266 |
|
267 |
|
268 |
|
269 |
|
270 | </td>
|
271 |
|
272 |
|
273 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
274 |
|
275 | <optional><br>
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 | </td>
|
282 |
|
283 |
|
284 |
|
285 |
|
286 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Second parameter of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch</a> method.</p></td>
|
287 | </tr>
|
288 |
|
289 |
|
290 | </tbody>
|
291 | </table>
|
292 |
|
293 |
|
294 |
|
295 |
|
296 | <dl class="details">
|
297 |
|
298 |
|
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 |
|
323 |
|
324 |
|
325 |
|
326 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
327 | <dd class="tag-source">
|
328 | <ul class="dummy">
|
329 | <li>
|
330 | <a href="CrossBase_net_fetch_CB_Net_Fetch.js.html">CrossBase/net/fetch/CB_Net_Fetch.js</a>,
|
331 | <a href="CrossBase_net_fetch_CB_Net_Fetch.js.html#sunlight-1-line-41">line 41</a>
|
332 | </li>
|
333 | </ul>
|
334 | </dd>
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 | </dl>
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 | <h5>Returns:</h5>
|
357 |
|
358 |
|
359 |
|
360 |
|
361 | <dl>
|
362 | <dt>
|
363 | Type
|
364 | </dt>
|
365 | <dd>
|
366 |
|
367 | <span class="param-type">Promise</span>
|
368 |
|
369 |
|
370 |
|
371 | </dd>
|
372 | </dl>
|
373 |
|
374 |
|
375 |
|
376 |
|
377 |
|
378 | </dd>
|
379 |
|
380 | </dl>
|
381 |
|
382 |
|
383 |
|
384 |
|
385 |
|
386 | </article>
|
387 |
|
388 | </section>
|
389 |
|
390 |
|
391 |
|
392 |
|
393 | </div>
|
394 | </div>
|
395 |
|
396 | <div class="clearfix"></div>
|
397 |
|
398 |
|
399 | <div class="col-md-3">
|
400 | <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
|
401 | </div>
|
402 |
|
403 |
|
404 | </div>
|
405 | </div>
|
406 |
|
407 |
|
408 | <div class="modal fade" id="searchResults">
|
409 | <div class="modal-dialog">
|
410 | <div class="modal-content">
|
411 | <div class="modal-header">
|
412 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
413 | <h4 class="modal-title">Search results</h4>
|
414 | </div>
|
415 | <div class="modal-body"></div>
|
416 | <div class="modal-footer">
|
417 | <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
418 | </div>
|
419 | </div>
|
420 | </div>
|
421 | </div>
|
422 |
|
423 |
|
424 | <footer>
|
425 |
|
426 |
|
427 | <span class="copyright">
|
428 | <a href="printable/" target="_blank">See a more printer-friendly version</a><hr /><span style="color:#000000">© <address style="display:inline; font-style:normal;"><a href="https://crossbrowdy.com/" target="_blank">CrossBrowdy</a> API documentation</address> by <a href="https://joanalbamaldonado.com/" target="_blank">Joan Alba Maldonado</a> - <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International</a><br />DocStrap Copyright © 2012-2015 The contributors to the JSDoc3 and DocStrap projects.</span>
|
429 | </span>
|
430 |
|
431 | <span class="jsdoc-message">
|
432 | Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>
|
433 |
|
434 | on Wed Mar 22nd 2023
|
435 |
|
436 | using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
437 | </span>
|
438 | </footer>
|
439 |
|
440 | <script src="scripts/docstrap.lib.js"></script>
|
441 | <script src="scripts/toc.js"></script>
|
442 |
|
443 | <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
|
444 |
|
445 |
|
446 | <script>
|
447 | $( function () {
|
448 | $( "[id*='$']" ).each( function () {
|
449 | var $this = $( this );
|
450 |
|
451 | $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
|
452 | } );
|
453 |
|
454 | $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
|
455 | var $this = $( this );
|
456 |
|
457 | var example = $this.find( "code" );
|
458 | exampleText = example.html();
|
459 | var lang = /{@lang (.*?)}/.exec( exampleText );
|
460 | if ( lang && lang[1] ) {
|
461 | exampleText = exampleText.replace( lang[0], "" );
|
462 | example.html( exampleText );
|
463 | lang = lang[1];
|
464 | } else {
|
465 | var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
|
466 | lang = langClassMatch ? langClassMatch[1] : "javascript";
|
467 | }
|
468 |
|
469 | if ( lang ) {
|
470 |
|
471 | $this
|
472 | .addClass( "sunlight-highlight-" + lang )
|
473 | .addClass( "linenums" )
|
474 | .html( example.html() );
|
475 |
|
476 | }
|
477 | } );
|
478 |
|
479 | Sunlight.highlightAll( {
|
480 | lineNumbers : true,
|
481 | showMenu : true,
|
482 | enableDoclinks : true
|
483 | } );
|
484 |
|
485 | $.catchAnchorLinks( {
|
486 | navbarOffset: 10
|
487 | } );
|
488 | $( "#toc" ).toc( {
|
489 | anchorName : function ( i, heading, prefix ) {
|
490 | return $( heading ).attr( "id" ) || ( prefix + i );
|
491 | },
|
492 | selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
|
493 | showAndHide : false,
|
494 | smoothScrolling: true
|
495 | } );
|
496 |
|
497 | $( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
498 | $( '.dropdown-toggle' ).dropdown();
|
499 |
|
500 | $( "table" ).each( function () {
|
501 | var $this = $( this );
|
502 | $this.addClass('table');
|
503 | } );
|
504 |
|
505 | } );
|
506 | </script>
|
507 |
|
508 |
|
509 |
|
510 |
|
511 |
|
512 | <script>
|
513 | $( function () {
|
514 | $( '#main' ).localScroll( {
|
515 | offset : { top : 60 }
|
516 | } );
|
517 | $( "dt.name" ).each( function () {
|
518 | var $this = $( this ).find("h4");
|
519 | var icon = $( "<i/>" ).addClass( "icon-plus-sign" ).addClass( "pull-right" ).addClass( "icon-white" );
|
520 | var dt = $(this);
|
521 | var children = dt.next( "dd" );
|
522 |
|
523 | dt.prepend( icon ).css( {cursor : "pointer"} );
|
524 | dt.addClass( "member-collapsed" ).addClass( "member" );
|
525 |
|
526 |
|
527 | children.hide();
|
528 |
|
529 | dt.children().on( "click", function () {
|
530 | children = dt.next( "dd" );
|
531 | children.slideToggle( "fast", function () {
|
532 |
|
533 | if ( children.is( ":visible" ) ) {
|
534 | icon.addClass( "icon-minus-sign" ).removeClass( "icon-plus-sign" ).removeClass( "icon-white" );
|
535 | dt.addClass( "member-open" ).animate( "member-collapsed" );
|
536 | } else {
|
537 | icon.addClass( "icon-plus-sign" ).removeClass( "icon-minus-sign" ).addClass( "icon-white" );
|
538 | dt.addClass( "member-collapsed" ).removeClass( "member-open" );
|
539 | }
|
540 | } );
|
541 | } );
|
542 |
|
543 | } );
|
544 | } );
|
545 | </script>
|
546 |
|
547 |
|
548 |
|
549 |
|
550 |
|
551 |
|
552 | <script type="text/javascript">
|
553 | $(document).ready(function() {
|
554 | SearcherDisplay.init();
|
555 | });
|
556 | </script>
|
557 |
|
558 |
|
559 | </body>
|
560 | </html> |
\ | No newline at end of file |