Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 [ | |
| 6 { | |
| 7 "namespace": "webview", | |
|
Matt Perry
2013/01/23 20:23:58
add "nodoc": true here. Otherwise we'll generate e
Fady Samuel
2013/01/23 20:54:32
Done. Yes, <webview> is documented elsewhere.
| |
| 8 "dependencies": [ "extension", "tabs" ], | |
| 9 "types": [ | |
| 10 // TODO(fsamuel): We should be usng tabs.InjectDetails. However, due to a | |
| 11 // bug in the JSON compiler, we are currently copying-and-pasting this | |
| 12 // type: https://crbug.com/171726. | |
| 13 { | |
| 14 "id": "InjectDetails", | |
| 15 "type": "object", | |
| 16 "description": "Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.", | |
| 17 "properties": { | |
| 18 "code": {"type": "string", "optional": true, "description": "JavaScrip t or CSS code to inject."}, | |
| 19 "file": {"type": "string", "optional": true, "description": "JavaScrip t or CSS file to inject."}, | |
| 20 "allFrames": {"type": "boolean", "optional": true, "description": "If allFrames is <code>true</code>, implies that the JavaScript or CSS should be inj ected into all frames of current page. By default, it's <code>false</code> and w ill only be injected into the top frame."}, | |
| 21 "runAt": { | |
| 22 "type": "string", | |
| 23 "optional": true, | |
| 24 "enum": ["document_start", "document_end", "document_idle"], | |
| 25 "description": "The soonest that the JavaScript or CSS will be injec ted into the tab. Defaults to \"document_idle\"." | |
| 26 } | |
| 27 } | |
| 28 } | |
| 29 ], | |
| 30 "functions": [ | |
| 31 { | |
| 32 "name": "executeScript", | |
| 33 "type": "function", | |
| 34 "description": "Injects JavaScript code into a <webview> page.", | |
| 35 "parameters": [ | |
| 36 { | |
| 37 "type": "integer", | |
| 38 "name": "processId", | |
| 39 "description": "The process ID of the guest <webview> process." | |
| 40 }, | |
| 41 { | |
| 42 "type": "integer", | |
| 43 "name": "routeId", | |
| 44 "description": "The route ID of the guest <webview> renderer." | |
| 45 }, | |
| 46 { | |
| 47 "$ref": "webview.InjectDetails", | |
| 48 "name": "details", | |
| 49 "description": "Details of the script to run." | |
| 50 }, | |
| 51 { | |
| 52 "type": "function", | |
| 53 "name": "callback", | |
| 54 "optional": true, | |
| 55 "description": "Called after all the JavaScript has been executed.", | |
| 56 "parameters": [ | |
| 57 { | |
| 58 "name": "result", | |
| 59 "optional": true, | |
| 60 "type": "array", | |
| 61 "items": {"type": "any", "minimum": 0}, | |
| 62 "description": "The result of the script in every injected frame ." | |
| 63 } | |
| 64 ] | |
| 65 } | |
| 66 ] | |
| 67 } | |
| 68 ] | |
| 69 } | |
| 70 ] | |
| 71 | |
| OLD | NEW |