| OLD | NEW |
| 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: |
| 2 1) The <head> information in this page is significant, should be uniform | 2 1) The <head> information in this page is significant, should be uniform |
| 3 across api docs and should be edited only with knowledge of the | 3 across api docs and should be edited only with knowledge of the |
| 4 templating mechanism. | 4 templating mechanism. |
| 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
| 6 browser, it will be re-generated from the template, json schema and | 6 browser, it will be re-generated from the template, json schema and |
| 7 authored overview content. | 7 authored overview content. |
| 8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
| 9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
| 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 </li><li jsinstance="4"> | 175 </li><li jsinstance="4"> |
| 176 <a href="#method-getURL">getURL</a> | 176 <a href="#method-getURL">getURL</a> |
| 177 </li><li jsinstance="*5"> | 177 </li><li jsinstance="*5"> |
| 178 <a href="#method-getViews">getViews</a> | 178 <a href="#method-getViews">getViews</a> |
| 179 </li> | 179 </li> |
| 180 </ol> | 180 </ol> |
| 181 </li> | 181 </li> |
| 182 <li> | 182 <li> |
| 183 <a href="#events">Events</a> | 183 <a href="#events">Events</a> |
| 184 <ol> | 184 <ol> |
| 185 <li jsinstance="*0"> | 185 <li jsinstance="0"> |
| 186 <a href="#event-onConnect">onConnect</a> | 186 <a href="#event-onConnect">onConnect</a> |
| 187 </li><li jsinstance="*1"> |
| 188 <a href="#event-onConnectExternal">onConnectExternal</a> |
| 187 </li> | 189 </li> |
| 188 </ol> | 190 </ol> |
| 189 </li> | 191 </li> |
| 190 <li> | 192 <li> |
| 191 <a href="#types">Types</a> | 193 <a href="#types">Types</a> |
| 192 <ol> | 194 <ol> |
| 193 <li jsinstance="*0"> | 195 <li jsinstance="*0"> |
| 194 <a href="#type-Port">Port</a> | 196 <a href="#type-Port">Port</a> |
| 195 </li> | 197 </li> |
| 196 </ol> | 198 </ol> |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 <a name="methods"></a> | 346 <a name="methods"></a> |
| 345 <h3>Methods</h3> | 347 <h3>Methods</h3> |
| 346 | 348 |
| 347 <!-- iterates over all functions --> | 349 <!-- iterates over all functions --> |
| 348 <div class="apiItem" jsinstance="0"> | 350 <div class="apiItem" jsinstance="0"> |
| 349 <a name="method-connect"></a> <!-- method-anchor --> | 351 <a name="method-connect"></a> <!-- method-anchor --> |
| 350 <h4>connect</h4> | 352 <h4>connect</h4> |
| 351 | 353 |
| 352 <div class="summary"><span>Port</span> | 354 <div class="summary"><span>Port</span> |
| 353 <!-- Note: intentionally longer 80 columns --> | 355 <!-- Note: intentionally longer 80 columns --> |
| 354 <span>chrome.extension.connect</span>(<span jsinstance="*0" cl
ass="optional"><span style="display: none; ">, </span><span>object</span> | 356 <span>chrome.extension.connect</span>(<span jsinstance="0" cla
ss="optional"><span style="display: none; ">, </span><span>string</span> |
| 357 <var><span>extensionId</span></var></span><span jsinstance
="*1" class="optional"><span>, </span><span>object</span> |
| 355 <var><span>connectInfo</span></var></span>)</div> | 358 <var><span>connectInfo</span></var></span>)</div> |
| 356 | 359 |
| 357 <div class="description"> | 360 <div class="description"> |
| 358 <p class="todo" style="display: none; ">Undocumented.</p> | 361 <p class="todo" style="display: none; ">Undocumented.</p> |
| 359 <p>Attempts to connect to other listeners within the extension (
listeners may be toolstrips or the extension's background page). This is primari
ly useful for content scripts connecting to their extension processes. Extension
s may connect to content scripts embedded in tabs via <a href="broken"><var>chro
me.tabs.connectToTab</var></a>.</p> | 362 <p>Attempts to connect to other listeners within the extension (
listeners may be toolstrips or the extension's background page). This is primari
ly useful for content scripts connecting to their extension processes. Extension
s may connect to content scripts embedded in tabs via <a href="broken"><var>chro
me.tabs.connectToTab</var></a>.</p> |
| 360 | 363 |
| 361 <!-- PARAMETERS --> | 364 <!-- PARAMETERS --> |
| 362 <h4>Parameters</h4> | 365 <h4>Parameters</h4> |
| 363 <dl> | 366 <dl> |
| 364 <div jsinstance="*0"> | 367 <div jsinstance="0"> |
| 368 <div> |
| 369 <dt> |
| 370 <var>extensionId</var> |
| 371 <em> |
| 372 |
| 373 <!-- TYPE --> |
| 374 <div style="display:inline"> |
| 375 ( |
| 376 <span class="optional">optional</span> |
| 377 <span id="typeTemplate"> |
| 378 <span style="display: none; "> |
| 379 <a> Type</a> |
| 380 </span> |
| 381 <span> |
| 382 <span style="display: none; "> |
| 383 array of <span><span></span></span> |
| 384 </span> |
| 385 <span>string</span> |
| 386 </span> |
| 387 </span> |
| 388 ) |
| 389 </div> |
| 390 |
| 391 </em> |
| 392 </dt> |
| 393 <dd class="todo" style="display: none; "> |
| 394 Undocumented. |
| 395 </dd> |
| 396 <dd>The extension ID of the extension you want to connect to. If omitt
ed, default is your own extension.</dd> |
| 397 |
| 398 <!-- OBJECT PROPERTIES --> |
| 399 <dd style="display: none; "> |
| 400 <dl> |
| 401 <div> |
| 402 <div> |
| 403 </div> |
| 404 </div> |
| 405 </dl> |
| 406 </dd> |
| 407 </div> |
| 408 </div><div jsinstance="*1"> |
| 365 <div> | 409 <div> |
| 366 <dt> | 410 <dt> |
| 367 <var>connectInfo</var> | 411 <var>connectInfo</var> |
| 368 <em> | 412 <em> |
| 369 | 413 |
| 370 <!-- TYPE --> | 414 <!-- TYPE --> |
| 371 <div style="display:inline"> | 415 <div style="display:inline"> |
| 372 ( | 416 ( |
| 373 <span class="optional">optional</span> | 417 <span class="optional">optional</span> |
| 374 <span id="typeTemplate"> | 418 <span id="typeTemplate"> |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 </div> <!-- /apiItem --> | 1166 </div> <!-- /apiItem --> |
| 1123 | 1167 |
| 1124 </div> <!-- /apiGroup --> | 1168 </div> <!-- /apiGroup --> |
| 1125 | 1169 |
| 1126 <!-- EVENTS --> | 1170 <!-- EVENTS --> |
| 1127 <div class="apiGroup"> | 1171 <div class="apiGroup"> |
| 1128 <a name="events"></a> | 1172 <a name="events"></a> |
| 1129 <h3 id="events">Events</h3> | 1173 <h3 id="events">Events</h3> |
| 1130 | 1174 |
| 1131 <!-- iterates over all events --> | 1175 <!-- iterates over all events --> |
| 1132 <div class="apiItem" jsinstance="*0"> | 1176 <div class="apiItem" jsinstance="0"> |
| 1133 <a name="event-onConnect"></a> | 1177 <a name="event-onConnect"></a> |
| 1134 <h4>onConnect</h4> | 1178 <h4>onConnect</h4> |
| 1135 | 1179 |
| 1136 <div class="summary"> | 1180 <div class="summary"> |
| 1137 <!-- Note: intentionally longer 80 columns --> | 1181 <!-- Note: intentionally longer 80 columns --> |
| 1138 <span class="subdued">chrome.extension.</span><span>onConnect</s
pan><span class="subdued">.addListener</span>(function(<span>Port port</span>) <
span class="subdued">{...}</span>); | 1182 <span class="subdued">chrome.extension.</span><span>onConnect</s
pan><span class="subdued">.addListener</span>(function(<span>Port port</span>) <
span class="subdued">{...}</span>); |
| 1139 </div> | 1183 </div> |
| 1140 | 1184 |
| 1141 <div class="description"> | 1185 <div class="description"> |
| 1142 <p class="todo" style="display: none; ">Undocumented.</p> | 1186 <p class="todo" style="display: none; ">Undocumented.</p> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 </div> | 1230 </div> |
| 1187 </div> | 1231 </div> |
| 1188 </dl> | 1232 </dl> |
| 1189 </dd> | 1233 </dd> |
| 1190 </div> | 1234 </div> |
| 1191 </div> | 1235 </div> |
| 1192 </dl> | 1236 </dl> |
| 1193 | 1237 |
| 1194 </div> <!-- /decription --> | 1238 </div> <!-- /decription --> |
| 1195 | 1239 |
| 1240 </div><div class="apiItem" jsinstance="*1"> |
| 1241 <a name="event-onConnectExternal"></a> |
| 1242 <h4>onConnectExternal</h4> |
| 1243 |
| 1244 <div class="summary"> |
| 1245 <!-- Note: intentionally longer 80 columns --> |
| 1246 <span class="subdued">chrome.extension.</span><span>onConnectExt
ernal</span><span class="subdued">.addListener</span>(function(<span>Port port</
span>) <span class="subdued">{...}</span>); |
| 1247 </div> |
| 1248 |
| 1249 <div class="description"> |
| 1250 <p class="todo" style="display: none; ">Undocumented.</p> |
| 1251 <p>Fired when a connection is made from another extension.</p> |
| 1252 |
| 1253 <!-- PARAMETERS --> |
| 1254 <h4>Parameters</h4> |
| 1255 <dl> |
| 1256 <div jsinstance="*0"> |
| 1257 <div> |
| 1258 <dt> |
| 1259 <var>port</var> |
| 1260 <em> |
| 1261 |
| 1262 <!-- TYPE --> |
| 1263 <div style="display:inline"> |
| 1264 ( |
| 1265 <span class="optional" style="display: none; ">optional</spa
n> |
| 1266 <span id="typeTemplate"> |
| 1267 <span> |
| 1268 <a href="extension.html#type-Port">Port</a> |
| 1269 </span> |
| 1270 <span style="display: none; "> |
| 1271 <span> |
| 1272 array of <span><span></span></span> |
| 1273 </span> |
| 1274 <span>paramType</span> |
| 1275 </span> |
| 1276 </span> |
| 1277 ) |
| 1278 </div> |
| 1279 |
| 1280 </em> |
| 1281 </dt> |
| 1282 <dd class="todo"> |
| 1283 Undocumented. |
| 1284 </dd> |
| 1285 <dd style="display: none; "> |
| 1286 Description of this parameter from the json schema. |
| 1287 </dd> |
| 1288 |
| 1289 <!-- OBJECT PROPERTIES --> |
| 1290 <dd style="display: none; "> |
| 1291 <dl> |
| 1292 <div> |
| 1293 <div> |
| 1294 </div> |
| 1295 </div> |
| 1296 </dl> |
| 1297 </dd> |
| 1298 </div> |
| 1299 </div> |
| 1300 </dl> |
| 1301 |
| 1302 </div> <!-- /decription --> |
| 1303 |
| 1196 </div> <!-- /apiItem --> | 1304 </div> <!-- /apiItem --> |
| 1197 | 1305 |
| 1198 </div> <!-- /apiGroup --> | 1306 </div> <!-- /apiGroup --> |
| 1199 | 1307 |
| 1200 <!-- TYPES --> | 1308 <!-- TYPES --> |
| 1201 <div class="apiGroup"> | 1309 <div class="apiGroup"> |
| 1202 <a name="types.sort(sortByName)"></a> | 1310 <a name="types.sort(sortByName)"></a> |
| 1203 <h3 id="types">Types</h3> | 1311 <h3 id="types">Types</h3> |
| 1204 | 1312 |
| 1205 <!-- iterates over all types --> | 1313 <!-- iterates over all types --> |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 <div> | 1516 <div> |
| 1409 <div> | 1517 <div> |
| 1410 </div> | 1518 </div> |
| 1411 </div> | 1519 </div> |
| 1412 </dl> | 1520 </dl> |
| 1413 </dd> | 1521 </dd> |
| 1414 </div> | 1522 </div> |
| 1415 </div><div jsinstance="*4"> | 1523 </div><div jsinstance="*4"> |
| 1416 <div> | 1524 <div> |
| 1417 <dt> | 1525 <dt> |
| 1526 <var>sender</var> |
| 1527 <em> |
| 1528 |
| 1529 <!-- TYPE --> |
| 1530 <div style="display:inline"> |
| 1531 ( |
| 1532 <span class="optional">optional</span> |
| 1533 <span id="typeTemplate"> |
| 1534 <span style="display: none; "> |
| 1535 <a> Type</a> |
| 1536 </span> |
| 1537 <span> |
| 1538 <span style="display: none; "> |
| 1539 array of <span><span></span></span> |
| 1540 </span> |
| 1541 <span>object</span> |
| 1542 </span> |
| 1543 </span> |
| 1544 ) |
| 1545 </div> |
| 1546 |
| 1547 </em> |
| 1548 </dt> |
| 1549 <dd class="todo" style="display: none; "> |
| 1550 Undocumented. |
| 1551 </dd> |
| 1552 <dd>This property will <b>only</b> be present on ports passed to onCon
nect/onConnectExternal listeners.</dd> |
| 1553 |
| 1554 <!-- OBJECT PROPERTIES --> |
| 1555 <dd> |
| 1556 <dl> |
| 1557 <div jsinstance="0"> |
| 1558 <div> |
| 1559 <dt> |
| 1418 <var>tab</var> | 1560 <var>tab</var> |
| 1419 <em> | 1561 <em> |
| 1420 | 1562 |
| 1421 <!-- TYPE --> | 1563 <!-- TYPE --> |
| 1422 <div style="display:inline"> | 1564 <div style="display:inline"> |
| 1423 ( | 1565 ( |
| 1424 <span class="optional">optional</span> | 1566 <span class="optional">optional</span> |
| 1425 <span id="typeTemplate"> | 1567 <span id="typeTemplate"> |
| 1426 <span> | 1568 <span> |
| 1427 <a href="tabs.html#type-Tab">Tab</a> | 1569 <a href="tabs.html#type-Tab">Tab</a> |
| 1428 </span> | 1570 </span> |
| 1429 <span style="display: none; "> | 1571 <span style="display: none; "> |
| 1430 <span> | 1572 <span> |
| 1431 array of <span><span></span></span> | 1573 array of <span><span></span></span> |
| 1432 </span> | 1574 </span> |
| 1433 <span>paramType</span> | 1575 <span>paramType</span> |
| 1434 </span> | 1576 </span> |
| 1435 </span> | 1577 </span> |
| 1436 ) | 1578 ) |
| 1437 </div> | 1579 </div> |
| 1438 | 1580 |
| 1439 </em> | 1581 </em> |
| 1440 </dt> | 1582 </dt> |
| 1441 <dd class="todo" style="display: none; "> | 1583 <dd class="todo" style="display: none; "> |
| 1442 Undocumented. | 1584 Undocumented. |
| 1443 </dd> | 1585 </dd> |
| 1444 <dd>This property will <b>only</b> be present on ports passed to onCon
nect listeners when the connection was opened from a tab or content script.</dd> | 1586 <dd>This property will <b>only</b> be present when the connection was
opened from a tab or content script.</dd> |
| 1445 | 1587 |
| 1446 <!-- OBJECT PROPERTIES --> | 1588 <!-- OBJECT PROPERTIES --> |
| 1447 <dd style="display: none; "> | 1589 <dd style="display: none; "> |
| 1590 <dl> |
| 1591 <div> |
| 1592 <div> |
| 1593 </div> |
| 1594 </div> |
| 1595 </dl> |
| 1596 </dd> |
| 1597 </div> |
| 1598 </div><div jsinstance="*1"> |
| 1599 <div> |
| 1600 <dt> |
| 1601 <var>id</var> |
| 1602 <em> |
| 1603 |
| 1604 <!-- TYPE --> |
| 1605 <div style="display:inline"> |
| 1606 ( |
| 1607 <span class="optional" style="display: none; ">optional</spa
n> |
| 1608 <span id="typeTemplate"> |
| 1609 <span style="display: none; "> |
| 1610 <a> Type</a> |
| 1611 </span> |
| 1612 <span> |
| 1613 <span style="display: none; "> |
| 1614 array of <span><span></span></span> |
| 1615 </span> |
| 1616 <span>string</span> |
| 1617 </span> |
| 1618 </span> |
| 1619 ) |
| 1620 </div> |
| 1621 |
| 1622 </em> |
| 1623 </dt> |
| 1624 <dd class="todo" style="display: none; "> |
| 1625 Undocumented. |
| 1626 </dd> |
| 1627 <dd>The extension ID of the extension that opened the connection.</dd> |
| 1628 |
| 1629 <!-- OBJECT PROPERTIES --> |
| 1630 <dd style="display: none; "> |
| 1448 <dl> | 1631 <dl> |
| 1449 <div> | 1632 <div> |
| 1450 <div> | 1633 <div> |
| 1451 </div> | 1634 </div> |
| 1452 </div> | 1635 </div> |
| 1453 </dl> | 1636 </dl> |
| 1454 </dd> | 1637 </dd> |
| 1455 </div> | 1638 </div> |
| 1456 </div> | 1639 </div> |
| 1457 </dl> | 1640 </dl> |
| 1458 </dd> | 1641 </dd> |
| 1459 </div> | 1642 </div> |
| 1643 </div> |
| 1644 </dl> |
| 1645 </dd> |
| 1646 </div> |
| 1460 | 1647 |
| 1461 </div> <!-- /apiItem --> | 1648 </div> <!-- /apiItem --> |
| 1462 | 1649 |
| 1463 </div> <!-- /apiGroup --> | 1650 </div> <!-- /apiGroup --> |
| 1464 | 1651 |
| 1465 </div> <!-- /apiPage --> | 1652 </div> <!-- /apiPage --> |
| 1466 </div> <!-- /mainColumn --> | 1653 </div> <!-- /mainColumn --> |
| 1467 </div> <!-- /pageContent --> | 1654 </div> <!-- /pageContent --> |
| 1468 <div id="pageFooter" --=""> | 1655 <div id="pageFooter" --=""> |
| 1469 <p> | 1656 <p> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1495 urchinTracker(); | 1682 urchinTracker(); |
| 1496 } | 1683 } |
| 1497 catch(e) {/* urchinTracker not available. */} | 1684 catch(e) {/* urchinTracker not available. */} |
| 1498 </script> | 1685 </script> |
| 1499 <!-- end analytics --> | 1686 <!-- end analytics --> |
| 1500 | 1687 |
| 1501 </div> <!-- /pageFooter --> | 1688 </div> <!-- /pageFooter --> |
| 1502 </div> <!-- /container --> | 1689 </div> <!-- /container --> |
| 1503 </body></html> | 1690 </body></html> |
| 1504 | 1691 |
| OLD | NEW |