├── .github ├── Dockerfile └── workflows │ ├── android.yml │ ├── ios-catalyst.yml │ └── ios.yml ├── .gitignore ├── README.md ├── patches ├── android │ ├── build.patch │ └── main.patch ├── ios │ └── main.patch └── prebuild_no_snapd.patch └── scripts ├── apply_patch.sh ├── build.android.sh ├── build.ios.sh ├── env.sh └── setup-build.sh /.github/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | MAINTAINER https://github.com/Kudo 3 | 4 | RUN apt-get update 5 | ENV DEBIAN_FRONTEND noninteractive 6 | RUN apt-get install -y sudo 7 | 8 | RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000 ubuntu 9 | RUN echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers 10 | USER ubuntu 11 | WORKDIR /home/ubuntu 12 | -------------------------------------------------------------------------------- /.github/workflows/android.yml: -------------------------------------------------------------------------------- 1 | name: Build for Android 2 | 3 | on: [workflow_dispatch] 4 | 5 | jobs: 6 | build: 7 | strategy: 8 | # max-parallel: 1 9 | matrix: 10 | arch: ['arm' ,'arm64' ,'x86' ,'x64'] 11 | # arch: ['arm'] 12 | runs-on: ubuntu-latest 13 | name: ${{ matrix.arch }} 14 | env: 15 | DEBIAN_FRONTEND: noninteractive 16 | TZ: UTC 17 | CCACHE_DIR: ${{ github.workspace }}/.ccache 18 | USE_CCACHE: 1 19 | container: 20 | image: kudo/ubuntu-nonroot:20.04 21 | steps: 22 | - name: Setup docker workspace 23 | run: | 24 | sudo sh -c "chown -R ubuntu $HOME" 25 | sudo sh -c "chmod 777 $GITHUB_WORKSPACE" 26 | # sudo sh -c "chmod 777 $GITHUB_WORKSPACE/../../_temp" 27 | sudo sh -c "chmod 777 /home" 28 | 29 | - uses: actions/checkout@v2 30 | 31 | - name: Setup Ubuntu environment 32 | run: | 33 | sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime 34 | sudo apt-get update 35 | sudo apt-get upgrade -y 36 | sudo apt-get install -y sudo apt-utils sudo ccache lsb-core git python nodejs npm wget openjdk-8-jre openjdk-8-jdk 37 | git config --global user.email "git@job.com"; git config --global user.name "GitJob" 38 | 39 | - name: Setup Build V8 40 | run: | 41 | ./scripts/setup-build.sh android 42 | sudo apt-get install -y libatomic1-i386-cross && sudo sh -c 'echo "/usr/i686-linux-gnu/lib" >> /etc/ld.so.conf.d/i386-linux-gnu.conf' && sudo ldconfig 43 | 44 | - name: Retrieve ccache 45 | uses: actions/cache@v2 46 | with: 47 | path: ${{ env.CCACHE_DIR }} 48 | key: ${{ runner.os }}-ccache-${{ matrix.arch }}-${{ github.sha }} 49 | restore-keys: | 50 | ${{ runner.os }}-ccache-${{ matrix.arch }}- 51 | ${{ runner.os }}-ccache- 52 | 53 | - name: Build 54 | run: ./scripts/build.android.sh -l ${{ matrix.arch }} 55 | 56 | - name: Show summary of ccache configuration and statistics counters 57 | run: ccache --show-stats 58 | 59 | - name: Archive Build 60 | uses: actions/upload-artifact@v2 61 | with: 62 | name: libv8-release-${{ matrix.arch }} 63 | path: dist/${{ matrix.arch }}-release 64 | 65 | # Combine the various architecture builds with the headers and a custom libv8.json file 66 | package: 67 | runs-on: ubuntu-latest 68 | name: Package 69 | needs: build 70 | steps: 71 | - uses: actions/checkout@v2 72 | 73 | - name: Setup Ubuntu environment 74 | run: | 75 | sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime 76 | sudo apt-get update 77 | sudo apt-get upgrade -y 78 | sudo apt-get install -y sudo apt-utils sudo lsb-core git python3 python 79 | git config --global user.email "git@job.com"; git config --global user.name "GitJob" 80 | 81 | - name: Get branch name (merge) 82 | if: github.event_name != 'pull_request' 83 | shell: bash 84 | run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV 85 | 86 | - name: Get branch name (pull request) 87 | if: github.event_name == 'pull_request' 88 | shell: bash 89 | run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV 90 | 91 | - name: Setup Build V8 92 | run: | 93 | ./scripts/setup-build.sh 94 | 95 | - name: Create directories 96 | run: mkdir -p 'build/release/libs' 2>/dev/null 97 | 98 | - name: Create libv8.json 99 | run: | 100 | source ./scripts/env.sh 101 | gitRepo=$(git config --get remote.origin.url) 102 | gitRevision=$(git -C v8 rev-parse HEAD) 103 | timestamp=$(date '+%Y-%m-%d %H:%M:%S') 104 | MAJOR=$(grep "#define V8_MAJOR_VERSION" "v8/include/v8-version.h" | awk '{print $NF}' | tr -d '[[:space:]]') 105 | MINOR=$(grep "#define V8_MINOR_VERSION" "v8/include/v8-version.h" | awk '{print $NF}' | tr -d '[[:space:]]') 106 | BUILD=$(grep "#define V8_BUILD_NUMBER" "v8/include/v8-version.h" | awk '{print $NF}' | tr -d '[[:space:]]') 107 | PATCH=$(grep "#define V8_PATCH_LEVEL" "v8/include/v8-version.h" | awk '{print $NF}' | tr -d '[[:space:]]') 108 | v8Version="$MAJOR.$MINOR.$BUILD.$PATCH" 109 | ndkVersion=$(grep "Pkg.Revision" /Volumes/data/dev/nativescript/android-v8/v8/android-ndk-r22/source.properties | awk '{print $NF}' | tr -d '[[:space:]]') 110 | echo "v8Version=$v8Version" >> $GITHUB_ENV 111 | echo "{ 112 | \"version\": \"$v8Version\", 113 | \"git_repo\": \"$gitRepo\", 114 | \"git_revision\": \"$gitRevision\", 115 | \"git_branch\": \"${{ env.BRANCH_NAME }}\", 116 | \"timestamp\": \"$timestamp\", 117 | \"sdkPlatformVersion\": \"$ANDROID_SDK_PLATFORM_VERSION\", 118 | \"sdkBuildToolsVersion\": \"$ANDROID_SDK_BUILD_TOOLS_VERSION\", 119 | \"ndkRevision\": \"$NDK_VERSION\", 120 | \"ndkVersion\": \"$ndkVersion\", 121 | \"ndkApiLevel\": \"$NDK_API_LEVEL\", 122 | \"ndk64ApiLevel\": \"$NDK_64_API_LEVEL\" 123 | }" >> build/release/libv8.json 124 | 125 | - name: Download all workflow run artifsacts 126 | uses: actions/download-artifact@v2 127 | 128 | - name: Move built libraries to final folder 129 | run: | 130 | mv libv8-release-arm/generated build/release/generated 131 | mv libv8-release-arm/include build/release/include 132 | mv libv8-release-arm/v8_inspector build/release/v8_inspector 133 | mkdir build/release/libs/arm && mv libv8-release-arm/*.a build/release/libs/armeabi-v7a 134 | mkdir build/release/libs/arm64-v8a && mv libv8-release-arm64/*.a build/release/libs/arm64-v8a 135 | mkdir build/release/libs/x86 && mv libv8-release-x86/*.a build/release/libs/x86 136 | mkdir build/release/libs/x86_64 && mv libv8-release-x64/*.a build/release/libs/x86_64 137 | 138 | - name: Archive Build 139 | uses: actions/upload-artifact@v2 140 | with: 141 | name: libv8-android-${{ env.v8Version }}-release 142 | path: | 143 | build/release 144 | 145 | - name: Delete uneeded artifacts 146 | uses: geekyeggo/delete-artifact@v1 147 | with: 148 | name: | 149 | libv8-release-arm 150 | libv8-release-arm64 151 | libv8-release-x86 152 | libv8-release-x64 153 | -------------------------------------------------------------------------------- /.github/workflows/ios-catalyst.yml: -------------------------------------------------------------------------------- 1 | name: Build for iOS Catalyst 2 | 3 | on: [workflow_dispatch] 4 | 5 | env: 6 | CACHE_KEY_SUFFIX: v2 7 | 8 | jobs: 9 | build: 10 | runs-on: macOS-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Setup Build V8 16 | run: | 17 | brew install coreutils 18 | scripts/setup-build.sh ios 19 | 20 | - name: Build V8 catalyst 21 | run: | 22 | ./scripts/build.ios.sh -c 23 | 24 | - uses: actions/upload-artifact@v2 25 | with: 26 | name: dist 27 | path: dist -------------------------------------------------------------------------------- /.github/workflows/ios.yml: -------------------------------------------------------------------------------- 1 | name: Build for iOS 2 | 3 | on: [workflow_dispatch] 4 | 5 | env: 6 | CACHE_KEY_SUFFIX: v2 7 | 8 | jobs: 9 | build: 10 | runs-on: macOS-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Setup Build V8 16 | run: | 17 | brew install coreutils 18 | scripts/setup-build.sh ios 19 | 20 | - name: Build V8 21 | run: | 22 | ./scripts/build.ios.sh 23 | 24 | - uses: actions/upload-artifact@v2 25 | with: 26 | name: dist 27 | path: dist -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode 3 | .cipd 4 | .gclient 5 | .gclient_entries -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # android-v8 2 | Contains the Google's V8 build used in android runtime. 3 | 4 | ### How to build (linux) 5 | 6 | * get depot tools [more](https://www.chromium.org/developers/how-tos/install-depot-tools) : 7 | ``` 8 | git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git 9 | 10 | export PATH=`pwd`/depot_tools:"$PATH" 11 | ``` 12 | 13 | * Make sure you have these packages installed (Linux only) 14 | ``` 15 | sudo apt-get install curl libc6-dev-i386 g++-multilib 16 | ``` 17 | 18 | * Download and extract Android NDK r22b 19 | 20 | Linux: 21 | ``` 22 | curl -O https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip 23 | unzip android-ndk-r22b-linux-x86_64.zip -d ndkr22b 24 | ``` 25 | 26 | * Export ANDROID_NDK_HOME environment variable 27 | ``` 28 | export ANDROID_NDK_HOME=`pwd`/ndkr22b/android-ndk-r22b 29 | ``` 30 | 31 | * `fetch v8` (this will create a `v8` repo folder and add a `.gclient` file) 32 | 33 | * Add `target_os` to the `.gclient` file: 34 | 35 | This will ensure that the required build dependencies are fetched by depot_tools 36 | 37 | ``` 38 | solutions = [ 39 | { 40 | "url": "https://chromium.googlesource.com/v8/v8.git", 41 | "managed": False, 42 | "name": "v8", 43 | "deps_file": "DEPS", 44 | "custom_deps": {}, 45 | }, 46 | ] 47 | target_os = ['android'] 48 | ``` 49 | 50 | * checkout tag 9.7.106.13 51 | ``` 52 | cd v8 53 | git checkout 9.7.106.13 54 | ``` 55 | 56 | * Run sync 57 | ``` 58 | gclient sync 59 | ``` 60 | 61 | * Create symlinks 62 | ``` 63 | cp third_party/android_ndk/BUILD.gn $ANDROID_NDK_HOME 64 | rm -rf third_party/android_tools third_party/android_ndk 65 | mkdir third_party/android_tools 66 | ln -s $ANDROID_NDK_HOME third_party/android_tools/ndk 67 | ln -s $ANDROID_NDK_HOME third_party/android_ndk 68 | ``` 69 | 70 | * Apply patch running the following command 71 | ``` 72 | cd .. 73 | ./apply_patch.sh 74 | ``` 75 | 76 | * run the following command in the root folder command 77 | ``` 78 | cd .. 79 | ./build.sh 80 | ``` 81 | > you can run: `../build_v8 debug` if you want to build v8 in debug, by default it's built in release. 82 | 83 | ### Outputs 84 | 85 | The output folder is called `dist` and it's created at `v8` root level. 86 | 87 | ### HOW TO CREATE A NEW PATCH file 88 | 89 | git diff --cached > patch.diff 90 | 91 | ### What to do next 92 | 93 | * Copy the files from the **v8/dist** folder in the corresponding folder in [android-runtime](https://github.com/NativeScript/android-runtime/tree/master/test-app/runtime/src/main/libs) 94 | * Copy the files from the **v8/buildtools/third_party/libc++/trunk/include** (libc++) into [android-runtime/test-app/runtime/src/main/cpp/include/libc++](https://github.com/NativeScript/android-runtime/tree/master/test-app/runtime/src/main/cpp/include/libc++) 95 | * Update the **v8-versions.json** file in the [android-runtime root folder](https://github.com/NativeScript/android-runtime/blob/master/v8-versions.json) 96 | * Update the **settings.json** file in [android-runtime/build-artifacts/project-template-gradle](https://github.com/NativeScript/android-runtime/tree/master/build-artifacts/project-template-gradle/settings.json) 97 | * Replace all the needed header and inspector files in the repo. The following [article](https://github.com/NativeScript/android-runtime/blob/master/docs/extending-inspector.md) might be helpful 98 | -------------------------------------------------------------------------------- /patches/android/build.patch: -------------------------------------------------------------------------------- 1 | diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn 2 | index bc3de06d0..47eccc4a2 100644 3 | --- a/config/compiler/BUILD.gn 4 | +++ b/config/compiler/BUILD.gn 5 | @@ -268,6 +268,11 @@ config("compiler") { 6 | defines = [] 7 | configs = [] 8 | 9 | + # build fix 10 | + if (current_cpu == "x86_64" || current_cpu == "arm64") { 11 | + cflags += [ "-mno-outline-atomics" ] 12 | + } 13 | + 14 | # System-specific flags. If your compiler flags apply to one of the 15 | # categories here, add it to the associated file to keep this shared config 16 | # smaller. 17 | -------------------------------------------------------------------------------- /patches/android/main.patch: -------------------------------------------------------------------------------- 1 | diff --git a/BUILD.gn b/BUILD.gn 2 | index f491f2a4e6..0c84ff541e 100644 3 | --- a/BUILD.gn 4 | +++ b/BUILD.gn 5 | @@ -3951,6 +3951,8 @@ v8_source_set("v8_base_without_compiler") { 6 | 7 | sources = [ 8 | ### gcmole(all) ### 9 | + "src/V8NativeScriptExtension.h", 10 | + "src/V8NativeScriptExtension.cc", 11 | "src/api/api-arguments.cc", 12 | "src/api/api-natives.cc", 13 | "src/api/api.cc", 14 | diff --git a/include/js_protocol.pdl b/include/js_protocol.pdl 15 | index b34c8551ad..5085b5329d 100644 16 | --- a/include/js_protocol.pdl 17 | +++ b/include/js_protocol.pdl 18 | @@ -1651,3 +1651,3108 @@ deprecated domain Schema 19 | returns 20 | # List of supported domains. 21 | array of Domain domains 22 | + 23 | + 24 | +# Actions and events related to the inspected page belong to the page domain. 25 | +domain Page 26 | + depends on Debugger 27 | + depends on DOM 28 | + depends on Network 29 | + depends on Runtime 30 | + # Unique frame identifier. 31 | + type FrameId extends string 32 | + # Information about the Frame on the page. 33 | + type Frame extends object 34 | + properties 35 | + # Frame unique identifier. 36 | + string id 37 | + # Parent frame identifier. 38 | + optional string parentId 39 | + # Identifier of the loader associated with this frame. 40 | + Network.LoaderId loaderId 41 | + # Frame's name as specified in the tag. 42 | + optional string name 43 | + # Frame document's URL. 44 | + string url 45 | + # Frame document's security origin. 46 | + string securityOrigin 47 | + # Frame document's mimeType as determined by the browser. 48 | + string mimeType 49 | + # If the frame failed to load, this contains the URL that could not be loaded. 50 | + experimental optional string unreachableUrl 51 | + # Information about the Resource on the page. 52 | + experimental type FrameResource extends object 53 | + properties 54 | + # Resource URL. 55 | + string url 56 | + # Type of this resource. 57 | + Network.ResourceType type 58 | + # Resource mimeType as determined by the browser. 59 | + string mimeType 60 | + # last-modified timestamp as reported by server. 61 | + optional Network.TimeSinceEpoch lastModified 62 | + # Resource content size. 63 | + optional number contentSize 64 | + # True if the resource failed to load. 65 | + optional boolean failed 66 | + # True if the resource was canceled during loading. 67 | + optional boolean canceled 68 | + # Information about the Frame hierarchy along with their cached resources. 69 | + experimental type FrameResourceTree extends object 70 | + properties 71 | + # Frame information for this tree item. 72 | + Frame frame 73 | + # Child frames. 74 | + optional array of FrameResourceTree childFrames 75 | + # Information about frame resources. 76 | + array of FrameResource resources 77 | + # Information about the Frame hierarchy. 78 | + type FrameTree extends object 79 | + properties 80 | + # Frame information for this tree item. 81 | + Frame frame 82 | + # Child frames. 83 | + optional array of FrameTree childFrames 84 | + # Unique script identifier. 85 | + type ScriptIdentifier extends string 86 | + # Transition type. 87 | + type TransitionType extends string 88 | + enum 89 | + link 90 | + typed 91 | + address_bar 92 | + auto_bookmark 93 | + auto_subframe 94 | + manual_subframe 95 | + generated 96 | + auto_toplevel 97 | + form_submit 98 | + reload 99 | + keyword 100 | + keyword_generated 101 | + other 102 | + # Navigation history entry. 103 | + type NavigationEntry extends object 104 | + properties 105 | + # Unique id of the navigation history entry. 106 | + integer id 107 | + # URL of the navigation history entry. 108 | + string url 109 | + # URL that the user typed in the url bar. 110 | + string userTypedURL 111 | + # Title of the navigation history entry. 112 | + string title 113 | + # Transition type. 114 | + TransitionType transitionType 115 | + # Screencast frame metadata. 116 | + experimental type ScreencastFrameMetadata extends object 117 | + properties 118 | + # Top offset in DIP. 119 | + number offsetTop 120 | + # Page scale factor. 121 | + number pageScaleFactor 122 | + # Device screen width in DIP. 123 | + number deviceWidth 124 | + # Device screen height in DIP. 125 | + number deviceHeight 126 | + # Position of horizontal scroll in CSS pixels. 127 | + number scrollOffsetX 128 | + # Position of vertical scroll in CSS pixels. 129 | + number scrollOffsetY 130 | + # Frame swap timestamp. 131 | + optional Network.TimeSinceEpoch timestamp 132 | + # Javascript dialog type. 133 | + type DialogType extends string 134 | + enum 135 | + alert 136 | + confirm 137 | + prompt 138 | + beforeunload 139 | + # Error while paring app manifest. 140 | + type AppManifestError extends object 141 | + properties 142 | + # Error message. 143 | + string message 144 | + # If criticial, this is a non-recoverable parse error. 145 | + integer critical 146 | + # Error line. 147 | + integer line 148 | + # Error column. 149 | + integer column 150 | + # Layout viewport position and dimensions. 151 | + type LayoutViewport extends object 152 | + properties 153 | + # Horizontal offset relative to the document (CSS pixels). 154 | + integer pageX 155 | + # Vertical offset relative to the document (CSS pixels). 156 | + integer pageY 157 | + # Width (CSS pixels), excludes scrollbar if present. 158 | + integer clientWidth 159 | + # Height (CSS pixels), excludes scrollbar if present. 160 | + integer clientHeight 161 | + # Visual viewport position, dimensions, and scale. 162 | + type VisualViewport extends object 163 | + properties 164 | + # Horizontal offset relative to the layout viewport (CSS pixels). 165 | + number offsetX 166 | + # Vertical offset relative to the layout viewport (CSS pixels). 167 | + number offsetY 168 | + # Horizontal offset relative to the document (CSS pixels). 169 | + number pageX 170 | + # Vertical offset relative to the document (CSS pixels). 171 | + number pageY 172 | + # Width (CSS pixels), excludes scrollbar if present. 173 | + number clientWidth 174 | + # Height (CSS pixels), excludes scrollbar if present. 175 | + number clientHeight 176 | + # Scale relative to the ideal viewport (size at width=device-width). 177 | + number scale 178 | + # Page zoom factor (CSS to device independent pixels ratio). 179 | + optional number zoom 180 | + # Viewport for capturing screenshot. 181 | + type Viewport extends object 182 | + properties 183 | + # X offset in device independent pixels (dip). 184 | + number x 185 | + # Y offset in device independent pixels (dip). 186 | + number y 187 | + # Rectangle width in device independent pixels (dip). 188 | + number width 189 | + # Rectangle height in device independent pixels (dip). 190 | + number height 191 | + # Page scale factor. 192 | + number scale 193 | + # Generic font families collection. 194 | + experimental type FontFamilies extends object 195 | + properties 196 | + # The standard font-family. 197 | + optional string standard 198 | + # The fixed font-family. 199 | + optional string fixed 200 | + # The serif font-family. 201 | + optional string serif 202 | + # The sansSerif font-family. 203 | + optional string sansSerif 204 | + # The cursive font-family. 205 | + optional string cursive 206 | + # The fantasy font-family. 207 | + optional string fantasy 208 | + # The pictograph font-family. 209 | + optional string pictograph 210 | + # Default font sizes. 211 | + experimental type FontSizes extends object 212 | + properties 213 | + # Default standard font size. 214 | + optional integer standard 215 | + # Default fixed font size. 216 | + optional integer fixed 217 | + # Deprecated, please use addScriptToEvaluateOnNewDocument instead. 218 | + experimental deprecated command addScriptToEvaluateOnLoad 219 | + parameters 220 | + string scriptSource 221 | + returns 222 | + # Identifier of the added script. 223 | + ScriptIdentifier identifier 224 | + # Evaluates given script in every frame upon creation (before loading frame's scripts). 225 | + command addScriptToEvaluateOnNewDocument 226 | + parameters 227 | + string source 228 | + # If specified, creates an isolated world with the given name and evaluates given script in it. 229 | + # This world name will be used as the ExecutionContextDescription::name when the corresponding 230 | + # event is emitted. 231 | + experimental optional string worldName 232 | + returns 233 | + # Identifier of the added script. 234 | + ScriptIdentifier identifier 235 | + # Brings page to front (activates tab). 236 | + command bringToFront 237 | + # Capture page screenshot. 238 | + command captureScreenshot 239 | + parameters 240 | + # Image compression format (defaults to png). 241 | + optional enum format 242 | + jpeg 243 | + png 244 | + # Compression quality from range [0..100] (jpeg only). 245 | + optional integer quality 246 | + # Capture the screenshot of a given region only. 247 | + optional Viewport clip 248 | + # Capture the screenshot from the surface, rather than the view. Defaults to true. 249 | + experimental optional boolean fromSurface 250 | + returns 251 | + # Base64-encoded image data. 252 | + binary data 253 | + # Returns a snapshot of the page as a string. For MHTML format, the serialization includes 254 | + # iframes, shadow DOM, external resources, and element-inline styles. 255 | + experimental command captureSnapshot 256 | + parameters 257 | + # Format (defaults to mhtml). 258 | + optional enum format 259 | + mhtml 260 | + returns 261 | + # Serialized page data. 262 | + string data 263 | + # Clears the overriden device metrics. 264 | + experimental deprecated command clearDeviceMetricsOverride 265 | + # Use 'Emulation.clearDeviceMetricsOverride' instead 266 | + redirect Emulation 267 | + # Clears the overridden Device Orientation. 268 | + experimental deprecated command clearDeviceOrientationOverride 269 | + # Use 'DeviceOrientation.clearDeviceOrientationOverride' instead 270 | + redirect DeviceOrientation 271 | + # Clears the overriden Geolocation Position and Error. 272 | + deprecated command clearGeolocationOverride 273 | + # Use 'Emulation.clearGeolocationOverride' instead 274 | + redirect Emulation 275 | + # Creates an isolated world for the given frame. 276 | + command createIsolatedWorld 277 | + parameters 278 | + # Id of the frame in which the isolated world should be created. 279 | + FrameId frameId 280 | + # An optional name which is reported in the Execution Context. 281 | + optional string worldName 282 | + # Whether or not universal access should be granted to the isolated world. This is a powerful 283 | + # option, use with caution. 284 | + optional boolean grantUniveralAccess 285 | + returns 286 | + # Execution context of the isolated world. 287 | + Runtime.ExecutionContextId executionContextId 288 | + # Deletes browser cookie with given name, domain and path. 289 | + experimental deprecated command deleteCookie 290 | + # Use 'Network.deleteCookie' instead 291 | + redirect Network 292 | + parameters 293 | + # Name of the cookie to remove. 294 | + string cookieName 295 | + # URL to match cooke domain and path. 296 | + string url 297 | + # Disables page domain notifications. 298 | + command disable 299 | + # Enables page domain notifications. 300 | + command enable 301 | + command getAppManifest 302 | + returns 303 | + # Manifest location. 304 | + string url 305 | + array of AppManifestError errors 306 | + # Manifest content. 307 | + optional string data 308 | + # Returns all browser cookies. Depending on the backend support, will return detailed cookie 309 | + # information in the `cookies` field. 310 | + experimental deprecated command getCookies 311 | + # Use 'Network.getCookies' instead 312 | + redirect Network 313 | + returns 314 | + # Array of cookie objects. 315 | + array of Network.Cookie cookies 316 | + # Returns present frame tree structure. 317 | + command getFrameTree 318 | + returns 319 | + # Present frame tree structure. 320 | + FrameTree frameTree 321 | + # Returns metrics relating to the layouting of the page, such as viewport bounds/scale. 322 | + command getLayoutMetrics 323 | + returns 324 | + # Metrics relating to the layout viewport. 325 | + LayoutViewport layoutViewport 326 | + # Metrics relating to the visual viewport. 327 | + VisualViewport visualViewport 328 | + # Size of scrollable area. 329 | + DOM.Rect contentSize 330 | + # Returns navigation history for the current page. 331 | + command getNavigationHistory 332 | + returns 333 | + # Index of the current navigation history entry. 334 | + integer currentIndex 335 | + # Array of navigation history entries. 336 | + array of NavigationEntry entries 337 | + # Resets navigation history for the current page. 338 | + command resetNavigationHistory 339 | + # Returns content of the given resource. 340 | + experimental command getResourceContent 341 | + parameters 342 | + # Frame id to get resource for. 343 | + FrameId frameId 344 | + # URL of the resource to get content for. 345 | + string url 346 | + returns 347 | + # Resource content. 348 | + string content 349 | + # True, if content was served as base64. 350 | + boolean base64Encoded 351 | + # Returns present frame / resource tree structure. 352 | + experimental command getResourceTree 353 | + returns 354 | + # Present frame / resource tree structure. 355 | + FrameResourceTree frameTree 356 | + # Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). 357 | + command handleJavaScriptDialog 358 | + parameters 359 | + # Whether to accept or dismiss the dialog. 360 | + boolean accept 361 | + # The text to enter into the dialog prompt before accepting. Used only if this is a prompt 362 | + # dialog. 363 | + optional string promptText 364 | + # Navigates current page to the given URL. 365 | + command navigate 366 | + parameters 367 | + # URL to navigate the page to. 368 | + string url 369 | + # Referrer URL. 370 | + optional string referrer 371 | + # Intended transition type. 372 | + optional TransitionType transitionType 373 | + # Frame id to navigate, if not specified navigates the top frame. 374 | + optional FrameId frameId 375 | + returns 376 | + # Frame id that has navigated (or failed to navigate) 377 | + FrameId frameId 378 | + # Loader identifier. 379 | + optional Network.LoaderId loaderId 380 | + # User friendly error message, present if and only if navigation has failed. 381 | + optional string errorText 382 | + # Navigates current page to the given history entry. 383 | + command navigateToHistoryEntry 384 | + parameters 385 | + # Unique id of the entry to navigate to. 386 | + integer entryId 387 | + # Print page as PDF. 388 | + command printToPDF 389 | + parameters 390 | + # Paper orientation. Defaults to false. 391 | + optional boolean landscape 392 | + # Display header and footer. Defaults to false. 393 | + optional boolean displayHeaderFooter 394 | + # Print background graphics. Defaults to false. 395 | + optional boolean printBackground 396 | + # Scale of the webpage rendering. Defaults to 1. 397 | + optional number scale 398 | + # Paper width in inches. Defaults to 8.5 inches. 399 | + optional number paperWidth 400 | + # Paper height in inches. Defaults to 11 inches. 401 | + optional number paperHeight 402 | + # Top margin in inches. Defaults to 1cm (~0.4 inches). 403 | + optional number marginTop 404 | + # Bottom margin in inches. Defaults to 1cm (~0.4 inches). 405 | + optional number marginBottom 406 | + # Left margin in inches. Defaults to 1cm (~0.4 inches). 407 | + optional number marginLeft 408 | + # Right margin in inches. Defaults to 1cm (~0.4 inches). 409 | + optional number marginRight 410 | + # Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means 411 | + # print all pages. 412 | + optional string pageRanges 413 | + # Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. 414 | + # Defaults to false. 415 | + optional boolean ignoreInvalidPageRanges 416 | + # HTML template for the print header. Should be valid HTML markup with following 417 | + # classes used to inject printing values into them: 418 | + # - `date`: formatted print date 419 | + # - `title`: document title 420 | + # - `url`: document location 421 | + # - `pageNumber`: current page number 422 | + # - `totalPages`: total pages in the document 423 | + # 424 | + # For example, `` would generate span containing the title. 425 | + optional string headerTemplate 426 | + # HTML template for the print footer. Should use the same format as the `headerTemplate`. 427 | + optional string footerTemplate 428 | + # Whether or not to prefer page size as defined by css. Defaults to false, 429 | + # in which case the content will be scaled to fit the paper size. 430 | + optional boolean preferCSSPageSize 431 | + returns 432 | + # Base64-encoded pdf data. 433 | + binary data 434 | + # Reloads given page optionally ignoring the cache. 435 | + command reload 436 | + parameters 437 | + # If true, browser cache is ignored (as if the user pressed Shiftrefresh). 438 | + optional boolean ignoreCache 439 | + # If set, the script will be injected into all frames of the inspected page after reload. 440 | + # Argument will be ignored if reloading dataURL origin. 441 | + optional string scriptToEvaluateOnLoad 442 | + # Deprecated, please use removeScriptToEvaluateOnNewDocument instead. 443 | + experimental deprecated command removeScriptToEvaluateOnLoad 444 | + parameters 445 | + ScriptIdentifier identifier 446 | + # Removes given script from the list. 447 | + command removeScriptToEvaluateOnNewDocument 448 | + parameters 449 | + ScriptIdentifier identifier 450 | + # Acknowledges that a screencast frame has been received by the frontend. 451 | + experimental command screencastFrameAck 452 | + parameters 453 | + # Frame number. 454 | + integer sessionId 455 | + # Searches for given string in resource content. 456 | + experimental command searchInResource 457 | + parameters 458 | + # Frame id for resource to search in. 459 | + FrameId frameId 460 | + # URL of the resource to search in. 461 | + string url 462 | + # String to search for. 463 | + string query 464 | + # If true, search is case sensitive. 465 | + optional boolean caseSensitive 466 | + # If true, treats string parameter as regex. 467 | + optional boolean isRegex 468 | + returns 469 | + # List of search matches. 470 | + array of Debugger.SearchMatch result 471 | + # Enable Chrome's experimental ad filter on all sites. 472 | + experimental command setAdBlockingEnabled 473 | + parameters 474 | + # Whether to block ads. 475 | + boolean enabled 476 | + # Enable page Content Security Policy by-passing. 477 | + experimental command setBypassCSP 478 | + parameters 479 | + # Whether to bypass page CSP. 480 | + boolean enabled 481 | + # Overrides the values of device screen dimensions (window.screen.width, window.screen.height, 482 | + # window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media 483 | + # query results). 484 | + experimental deprecated command setDeviceMetricsOverride 485 | + # Use 'Emulation.setDeviceMetricsOverride' instead 486 | + redirect Emulation 487 | + parameters 488 | + # Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. 489 | + integer width 490 | + # Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. 491 | + integer height 492 | + # Overriding device scale factor value. 0 disables the override. 493 | + number deviceScaleFactor 494 | + # Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text 495 | + # autosizing and more. 496 | + boolean mobile 497 | + # Scale to apply to resulting view image. 498 | + optional number scale 499 | + # Overriding screen width value in pixels (minimum 0, maximum 10000000). 500 | + optional integer screenWidth 501 | + # Overriding screen height value in pixels (minimum 0, maximum 10000000). 502 | + optional integer screenHeight 503 | + # Overriding view X position on screen in pixels (minimum 0, maximum 10000000). 504 | + optional integer positionX 505 | + # Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). 506 | + optional integer positionY 507 | + # Do not set visible view size, rely upon explicit setVisibleSize call. 508 | + optional boolean dontSetVisibleSize 509 | + # Screen orientation override. 510 | + optional Emulation.ScreenOrientation screenOrientation 511 | + # The viewport dimensions and scale. If not set, the override is cleared. 512 | + optional Viewport viewport 513 | + # Overrides the Device Orientation. 514 | + experimental deprecated command setDeviceOrientationOverride 515 | + # Use 'DeviceOrientation.setDeviceOrientationOverride' instead 516 | + redirect DeviceOrientation 517 | + parameters 518 | + # Mock alpha 519 | + number alpha 520 | + # Mock beta 521 | + number beta 522 | + # Mock gamma 523 | + number gamma 524 | + # Set generic font families. 525 | + experimental command setFontFamilies 526 | + parameters 527 | + # Specifies font families to set. If a font family is not specified, it won't be changed. 528 | + FontFamilies fontFamilies 529 | + # Set default font sizes. 530 | + experimental command setFontSizes 531 | + parameters 532 | + # Specifies font sizes to set. If a font size is not specified, it won't be changed. 533 | + FontSizes fontSizes 534 | + # Sets given markup as the document's HTML. 535 | + command setDocumentContent 536 | + parameters 537 | + # Frame id to set HTML for. 538 | + FrameId frameId 539 | + # HTML content to set. 540 | + string html 541 | + # Set the behavior when downloading a file. 542 | + experimental command setDownloadBehavior 543 | + parameters 544 | + # Whether to allow all or deny all download requests, or use default Chrome behavior if 545 | + # available (otherwise deny). 546 | + enum behavior 547 | + deny 548 | + allow 549 | + default 550 | + # The default path to save downloaded files to. This is requred if behavior is set to 'allow' 551 | + optional string downloadPath 552 | + # Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position 553 | + # unavailable. 554 | + deprecated command setGeolocationOverride 555 | + # Use 'Emulation.setGeolocationOverride' instead 556 | + redirect Emulation 557 | + parameters 558 | + # Mock latitude 559 | + optional number latitude 560 | + # Mock longitude 561 | + optional number longitude 562 | + # Mock accuracy 563 | + optional number accuracy 564 | + # Controls whether page will emit lifecycle events. 565 | + experimental command setLifecycleEventsEnabled 566 | + parameters 567 | + # If true, starts emitting lifecycle events. 568 | + boolean enabled 569 | + # Toggles mouse event-based touch event emulation. 570 | + experimental deprecated command setTouchEmulationEnabled 571 | + # Use 'Emulation.setTouchEmulationEnabled' instead 572 | + redirect Emulation 573 | + parameters 574 | + # Whether the touch event emulation should be enabled. 575 | + boolean enabled 576 | + # Touch/gesture events configuration. Default: current platform. 577 | + optional enum configuration 578 | + mobile 579 | + desktop 580 | + # Starts sending each frame using the `screencastFrame` event. 581 | + experimental command startScreencast 582 | + parameters 583 | + # Image compression format. 584 | + optional enum format 585 | + jpeg 586 | + png 587 | + # Compression quality from range [0..100]. 588 | + optional integer quality 589 | + # Maximum screenshot width. 590 | + optional integer maxWidth 591 | + # Maximum screenshot height. 592 | + optional integer maxHeight 593 | + # Send every n-th frame. 594 | + optional integer everyNthFrame 595 | + # Force the page stop all navigations and pending resource fetches. 596 | + command stopLoading 597 | + # Crashes renderer on the IO thread, generates minidumps. 598 | + experimental command crash 599 | + # Tries to close page, running its beforeunload hooks, if any. 600 | + experimental command close 601 | + # Tries to update the web lifecycle state of the page. 602 | + # It will transition the page to the given state according to: 603 | + # https://github.com/WICG/web-lifecycle/ 604 | + experimental command setWebLifecycleState 605 | + parameters 606 | + # Target lifecycle state 607 | + enum state 608 | + frozen 609 | + active 610 | + # Stops sending each frame in the `screencastFrame`. 611 | + experimental command stopScreencast 612 | + # Forces compilation cache to be generated for every subresource script. 613 | + experimental command setProduceCompilationCache 614 | + parameters 615 | + boolean enabled 616 | + # Seeds compilation cache for given url. Compilation cache does not survive 617 | + # cross-process navigation. 618 | + experimental command addCompilationCache 619 | + parameters 620 | + string url 621 | + # Base64-encoded data 622 | + binary data 623 | + # Clears seeded compilation cache. 624 | + experimental command clearCompilationCache 625 | + # Generates a report for testing. 626 | + experimental command generateTestReport 627 | + parameters 628 | + # Message to be displayed in the report. 629 | + string message 630 | + # Specifies the endpoint group to deliver the report to. 631 | + optional string group 632 | + # Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger. 633 | + experimental command waitForDebugger 634 | + event domContentEventFired 635 | + parameters 636 | + Network.MonotonicTime timestamp 637 | + # Fired when frame has been attached to its parent. 638 | + event frameAttached 639 | + parameters 640 | + # Id of the frame that has been attached. 641 | + FrameId frameId 642 | + # Parent frame identifier. 643 | + FrameId parentFrameId 644 | + # JavaScript stack trace of when frame was attached, only set if frame initiated from script. 645 | + optional Runtime.StackTrace stack 646 | + # Fired when frame no longer has a scheduled navigation. 647 | + experimental event frameClearedScheduledNavigation 648 | + parameters 649 | + # Id of the frame that has cleared its scheduled navigation. 650 | + FrameId frameId 651 | + # Fired when frame has been detached from its parent. 652 | + event frameDetached 653 | + parameters 654 | + # Id of the frame that has been detached. 655 | + FrameId frameId 656 | + # Fired once navigation of the frame has completed. Frame is now associated with the new loader. 657 | + event frameNavigated 658 | + parameters 659 | + # Frame object. 660 | + Frame frame 661 | + experimental event frameResized 662 | + # Fired when frame schedules a potential navigation. 663 | + experimental event frameScheduledNavigation 664 | + parameters 665 | + # Id of the frame that has scheduled a navigation. 666 | + FrameId frameId 667 | + # Delay (in seconds) until the navigation is scheduled to begin. The navigation is not 668 | + # guaranteed to start. 669 | + number delay 670 | + # The reason for the navigation. 671 | + enum reason 672 | + formSubmissionGet 673 | + formSubmissionPost 674 | + httpHeaderRefresh 675 | + scriptInitiated 676 | + metaTagRefresh 677 | + pageBlockInterstitial 678 | + reload 679 | + # The destination URL for the scheduled navigation. 680 | + string url 681 | + # Fired when frame has started loading. 682 | + experimental event frameStartedLoading 683 | + parameters 684 | + # Id of the frame that has started loading. 685 | + FrameId frameId 686 | + # Fired when frame has stopped loading. 687 | + experimental event frameStoppedLoading 688 | + parameters 689 | + # Id of the frame that has stopped loading. 690 | + FrameId frameId 691 | + # Fired when interstitial page was hidden 692 | + event interstitialHidden 693 | + # Fired when interstitial page was shown 694 | + event interstitialShown 695 | + # Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been 696 | + # closed. 697 | + event javascriptDialogClosed 698 | + parameters 699 | + # Whether dialog was confirmed. 700 | + boolean result 701 | + # User input in case of prompt. 702 | + string userInput 703 | + # Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to 704 | + # open. 705 | + event javascriptDialogOpening 706 | + parameters 707 | + # Frame url. 708 | + string url 709 | + # Message that will be displayed by the dialog. 710 | + string message 711 | + # Dialog type. 712 | + DialogType type 713 | + # True iff browser is capable showing or acting on the given dialog. When browser has no 714 | + # dialog handler for given target, calling alert while Page domain is engaged will stall 715 | + # the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog. 716 | + boolean hasBrowserHandler 717 | + # Default dialog prompt. 718 | + optional string defaultPrompt 719 | + # Fired for top level page lifecycle events such as navigation, load, paint, etc. 720 | + event lifecycleEvent 721 | + parameters 722 | + # Id of the frame. 723 | + FrameId frameId 724 | + # Loader identifier. Empty string if the request is fetched from worker. 725 | + Network.LoaderId loaderId 726 | + string name 727 | + Network.MonotonicTime timestamp 728 | + event loadEventFired 729 | + parameters 730 | + Network.MonotonicTime timestamp 731 | + # Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. 732 | + experimental event navigatedWithinDocument 733 | + parameters 734 | + # Id of the frame. 735 | + FrameId frameId 736 | + # Frame's new url. 737 | + string url 738 | + # Compressed image data requested by the `startScreencast`. 739 | + experimental event screencastFrame 740 | + parameters 741 | + # Base64-encoded compressed image. 742 | + binary data 743 | + # Screencast frame metadata. 744 | + ScreencastFrameMetadata metadata 745 | + # Frame number. 746 | + integer sessionId 747 | + # Fired when the page with currently enabled screencast was shown or hidden `. 748 | + experimental event screencastVisibilityChanged 749 | + parameters 750 | + # True if the page is visible. 751 | + boolean visible 752 | + # Fired when a new window is going to be opened, via window.open(), link click, form submission, 753 | + # etc. 754 | + event windowOpen 755 | + parameters 756 | + # The URL for the new window. 757 | + string url 758 | + # Window name. 759 | + string windowName 760 | + # An array of enabled window features. 761 | + array of string windowFeatures 762 | + # Whether or not it was triggered by user gesture. 763 | + boolean userGesture 764 | + # Issued for every compilation cache generated. Is only available 765 | + # if Page.setGenerateCompilationCache is enabled. 766 | + experimental event compilationCacheProduced 767 | + parameters 768 | + string url 769 | + # Base64-encoded data 770 | + binary data 771 | + 772 | +# Network domain allows tracking network activities of the page. It exposes information about http, 773 | +# file, data and other requests and responses, their headers, bodies, timing, etc. 774 | +domain Network 775 | + depends on Debugger 776 | + depends on Runtime 777 | + depends on Security 778 | + # Resource type as it was perceived by the rendering engine. 779 | + type ResourceType extends string 780 | + enum 781 | + Document 782 | + Stylesheet 783 | + Image 784 | + Media 785 | + Font 786 | + Script 787 | + TextTrack 788 | + XHR 789 | + Fetch 790 | + EventSource 791 | + WebSocket 792 | + Manifest 793 | + SignedExchange 794 | + Ping 795 | + CSPViolationReport 796 | + Other 797 | + # Unique loader identifier. 798 | + type LoaderId extends string 799 | + # Unique request identifier. 800 | + type RequestId extends string 801 | + # Unique intercepted request identifier. 802 | + type InterceptionId extends string 803 | + # Network level fetch failure reason. 804 | + type ErrorReason extends string 805 | + enum 806 | + Failed 807 | + Aborted 808 | + TimedOut 809 | + AccessDenied 810 | + ConnectionClosed 811 | + ConnectionReset 812 | + ConnectionRefused 813 | + ConnectionAborted 814 | + ConnectionFailed 815 | + NameNotResolved 816 | + InternetDisconnected 817 | + AddressUnreachable 818 | + BlockedByClient 819 | + BlockedByResponse 820 | + # UTC time in seconds, counted from January 1, 1970. 821 | + type TimeSinceEpoch extends number 822 | + # Monotonically increasing time in seconds since an arbitrary point in the past. 823 | + type MonotonicTime extends number 824 | + # Request / response headers as keys / values of JSON object. 825 | + type Headers extends object 826 | + # The underlying connection technology that the browser is supposedly using. 827 | + type ConnectionType extends string 828 | + enum 829 | + none 830 | + cellular2g 831 | + cellular3g 832 | + cellular4g 833 | + bluetooth 834 | + ethernet 835 | + wifi 836 | + wimax 837 | + other 838 | + # Represents the cookie's 'SameSite' status: 839 | + # https://tools.ietf.org/html/draft-west-first-party-cookies 840 | + type CookieSameSite extends string 841 | + enum 842 | + Strict 843 | + Lax 844 | + # Timing information for the request. 845 | + type ResourceTiming extends object 846 | + properties 847 | + # Timing's requestTime is a baseline in seconds, while the other numbers are ticks in 848 | + # milliseconds relatively to this requestTime. 849 | + number requestTime 850 | + # Started resolving proxy. 851 | + number proxyStart 852 | + # Finished resolving proxy. 853 | + number proxyEnd 854 | + # Started DNS address resolve. 855 | + number dnsStart 856 | + # Finished DNS address resolve. 857 | + number dnsEnd 858 | + # Started connecting to the remote host. 859 | + number connectStart 860 | + # Connected to the remote host. 861 | + number connectEnd 862 | + # Started SSL handshake. 863 | + number sslStart 864 | + # Finished SSL handshake. 865 | + number sslEnd 866 | + # Started running ServiceWorker. 867 | + experimental number workerStart 868 | + # Finished Starting ServiceWorker. 869 | + experimental number workerReady 870 | + # Started sending request. 871 | + number sendStart 872 | + # Finished sending request. 873 | + number sendEnd 874 | + # Time the server started pushing request. 875 | + experimental number pushStart 876 | + # Time the server finished pushing request. 877 | + experimental number pushEnd 878 | + # Finished receiving response headers. 879 | + number receiveHeadersEnd 880 | + # Loading priority of a resource request. 881 | + type ResourcePriority extends string 882 | + enum 883 | + VeryLow 884 | + Low 885 | + Medium 886 | + High 887 | + VeryHigh 888 | + # HTTP request data. 889 | + type Request extends object 890 | + properties 891 | + # Request URL (without fragment). 892 | + string url 893 | + # Fragment of the requested URL starting with hash, if present. 894 | + optional string urlFragment 895 | + # HTTP request method. 896 | + string method 897 | + # HTTP request headers. 898 | + Headers headers 899 | + # HTTP POST request data. 900 | + optional string postData 901 | + # True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long. 902 | + optional boolean hasPostData 903 | + # The mixed content type of the request. 904 | + optional Security.MixedContentType mixedContentType 905 | + # Priority of the resource request at the time request is sent. 906 | + ResourcePriority initialPriority 907 | + # The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ 908 | + enum referrerPolicy 909 | + unsafe-url 910 | + no-referrer-when-downgrade 911 | + no-referrer 912 | + origin 913 | + origin-when-cross-origin 914 | + same-origin 915 | + strict-origin 916 | + strict-origin-when-cross-origin 917 | + # Whether is loaded via link preload. 918 | + optional boolean isLinkPreload 919 | + # Details of a signed certificate timestamp (SCT). 920 | + type SignedCertificateTimestamp extends object 921 | + properties 922 | + # Validation status. 923 | + string status 924 | + # Origin. 925 | + string origin 926 | + # Log name / description. 927 | + string logDescription 928 | + # Log ID. 929 | + string logId 930 | + # Issuance date. 931 | + TimeSinceEpoch timestamp 932 | + # Hash algorithm. 933 | + string hashAlgorithm 934 | + # Signature algorithm. 935 | + string signatureAlgorithm 936 | + # Signature data. 937 | + string signatureData 938 | + # Security details about a request. 939 | + type SecurityDetails extends object 940 | + properties 941 | + # Protocol name (e.g. "TLS 1.2" or "QUIC"). 942 | + string protocol 943 | + # Key Exchange used by the connection, or the empty string if not applicable. 944 | + string keyExchange 945 | + # (EC)DH group used by the connection, if applicable. 946 | + optional string keyExchangeGroup 947 | + # Cipher name. 948 | + string cipher 949 | + # TLS MAC. Note that AEAD ciphers do not have separate MACs. 950 | + optional string mac 951 | + # Certificate ID value. 952 | + Security.CertificateId certificateId 953 | + # Certificate subject name. 954 | + string subjectName 955 | + # Subject Alternative Name (SAN) DNS names and IP addresses. 956 | + array of string sanList 957 | + # Name of the issuing CA. 958 | + string issuer 959 | + # Certificate valid from date. 960 | + TimeSinceEpoch validFrom 961 | + # Certificate valid to (expiration) date 962 | + TimeSinceEpoch validTo 963 | + # List of signed certificate timestamps (SCTs). 964 | + array of SignedCertificateTimestamp signedCertificateTimestampList 965 | + # Whether the request complied with Certificate Transparency policy 966 | + CertificateTransparencyCompliance certificateTransparencyCompliance 967 | + # Whether the request complied with Certificate Transparency policy. 968 | + type CertificateTransparencyCompliance extends string 969 | + enum 970 | + unknown 971 | + not-compliant 972 | + compliant 973 | + # The reason why request was blocked. 974 | + type BlockedReason extends string 975 | + enum 976 | + other 977 | + csp 978 | + mixed-content 979 | + origin 980 | + inspector 981 | + subresource-filter 982 | + content-type 983 | + collapsed-by-client 984 | + # HTTP response data. 985 | + type Response extends object 986 | + properties 987 | + # Response URL. This URL can be different from CachedResource.url in case of redirect. 988 | + string url 989 | + # HTTP response status code. 990 | + integer status 991 | + # HTTP response status text. 992 | + string statusText 993 | + # HTTP response headers. 994 | + Headers headers 995 | + # HTTP response headers text. 996 | + optional string headersText 997 | + # Resource mimeType as determined by the browser. 998 | + string mimeType 999 | + # Refined HTTP request headers that were actually transmitted over the network. 1000 | + optional Headers requestHeaders 1001 | + # HTTP request headers text. 1002 | + optional string requestHeadersText 1003 | + # Specifies whether physical connection was actually reused for this request. 1004 | + boolean connectionReused 1005 | + # Physical connection id that was actually used for this request. 1006 | + number connectionId 1007 | + # Remote IP address. 1008 | + optional string remoteIPAddress 1009 | + # Remote port. 1010 | + optional integer remotePort 1011 | + # Specifies that the request was served from the disk cache. 1012 | + optional boolean fromDiskCache 1013 | + # Specifies that the request was served from the ServiceWorker. 1014 | + optional boolean fromServiceWorker 1015 | + # Total number of bytes received for this request so far. 1016 | + number encodedDataLength 1017 | + # Timing information for the given request. 1018 | + optional ResourceTiming timing 1019 | + # Protocol used to fetch this request. 1020 | + optional string protocol 1021 | + # Security state of the request resource. 1022 | + Security.SecurityState securityState 1023 | + # Security details for the request. 1024 | + optional SecurityDetails securityDetails 1025 | + # WebSocket request data. 1026 | + type WebSocketRequest extends object 1027 | + properties 1028 | + # HTTP request headers. 1029 | + Headers headers 1030 | + # WebSocket response data. 1031 | + type WebSocketResponse extends object 1032 | + properties 1033 | + # HTTP response status code. 1034 | + integer status 1035 | + # HTTP response status text. 1036 | + string statusText 1037 | + # HTTP response headers. 1038 | + Headers headers 1039 | + # HTTP response headers text. 1040 | + optional string headersText 1041 | + # HTTP request headers. 1042 | + optional Headers requestHeaders 1043 | + # HTTP request headers text. 1044 | + optional string requestHeadersText 1045 | + # WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests. 1046 | + type WebSocketFrame extends object 1047 | + properties 1048 | + # WebSocket message opcode. 1049 | + number opcode 1050 | + # WebSocket message mask. 1051 | + boolean mask 1052 | + # WebSocket message payload data. 1053 | + # If the opcode is 1, this is a text message and payloadData is a UTF-8 string. 1054 | + # If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data. 1055 | + string payloadData 1056 | + # Information about the cached resource. 1057 | + type CachedResource extends object 1058 | + properties 1059 | + # Resource URL. This is the url of the original network request. 1060 | + string url 1061 | + # Type of this resource. 1062 | + ResourceType type 1063 | + # Cached response data. 1064 | + optional Response response 1065 | + # Cached response body size. 1066 | + number bodySize 1067 | + # Information about the request initiator. 1068 | + type Initiator extends object 1069 | + properties 1070 | + # Type of this initiator. 1071 | + enum type 1072 | + parser 1073 | + script 1074 | + preload 1075 | + SignedExchange 1076 | + other 1077 | + # Initiator JavaScript stack trace, set for Script only. 1078 | + optional Runtime.StackTrace stack 1079 | + # Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. 1080 | + optional string url 1081 | + # Initiator line number, set for Parser type or for Script type (when script is importing 1082 | + # module) (0-based). 1083 | + optional number lineNumber 1084 | + # Cookie object 1085 | + type Cookie extends object 1086 | + properties 1087 | + # Cookie name. 1088 | + string name 1089 | + # Cookie value. 1090 | + string value 1091 | + # Cookie domain. 1092 | + string domain 1093 | + # Cookie path. 1094 | + string path 1095 | + # Cookie expiration date as the number of seconds since the UNIX epoch. 1096 | + number expires 1097 | + # Cookie size. 1098 | + integer size 1099 | + # True if cookie is http-only. 1100 | + boolean httpOnly 1101 | + # True if cookie is secure. 1102 | + boolean secure 1103 | + # True in case of session cookie. 1104 | + boolean session 1105 | + # Cookie SameSite type. 1106 | + optional CookieSameSite sameSite 1107 | + # Cookie parameter object 1108 | + type CookieParam extends object 1109 | + properties 1110 | + # Cookie name. 1111 | + string name 1112 | + # Cookie value. 1113 | + string value 1114 | + # The request-URI to associate with the setting of the cookie. This value can affect the 1115 | + # default domain and path values of the created cookie. 1116 | + optional string url 1117 | + # Cookie domain. 1118 | + optional string domain 1119 | + # Cookie path. 1120 | + optional string path 1121 | + # True if cookie is secure. 1122 | + optional boolean secure 1123 | + # True if cookie is http-only. 1124 | + optional boolean httpOnly 1125 | + # Cookie SameSite type. 1126 | + optional CookieSameSite sameSite 1127 | + # Cookie expiration date, session cookie if not set 1128 | + optional TimeSinceEpoch expires 1129 | + # Authorization challenge for HTTP status code 401 or 407. 1130 | + experimental type AuthChallenge extends object 1131 | + properties 1132 | + # Source of the authentication challenge. 1133 | + optional enum source 1134 | + Server 1135 | + Proxy 1136 | + # Origin of the challenger. 1137 | + string origin 1138 | + # The authentication scheme used, such as basic or digest 1139 | + string scheme 1140 | + # The realm of the challenge. May be empty. 1141 | + string realm 1142 | + # Response to an AuthChallenge. 1143 | + experimental type AuthChallengeResponse extends object 1144 | + properties 1145 | + # The decision on what to do in response to the authorization challenge. Default means 1146 | + # deferring to the default behavior of the net stack, which will likely either the Cancel 1147 | + # authentication or display a popup dialog box. 1148 | + enum response 1149 | + Default 1150 | + CancelAuth 1151 | + ProvideCredentials 1152 | + # The username to provide, possibly empty. Should only be set if response is 1153 | + # ProvideCredentials. 1154 | + optional string username 1155 | + # The password to provide, possibly empty. Should only be set if response is 1156 | + # ProvideCredentials. 1157 | + optional string password 1158 | + # Stages of the interception to begin intercepting. Request will intercept before the request is 1159 | + # sent. Response will intercept after the response is received. 1160 | + experimental type InterceptionStage extends string 1161 | + enum 1162 | + Request 1163 | + HeadersReceived 1164 | + # Request pattern for interception. 1165 | + experimental type RequestPattern extends object 1166 | + properties 1167 | + # Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is 1168 | + # backslash. Omitting is equivalent to "*". 1169 | + optional string urlPattern 1170 | + # If set, only requests for matching resource types will be intercepted. 1171 | + optional ResourceType resourceType 1172 | + # Stage at wich to begin intercepting requests. Default is Request. 1173 | + optional InterceptionStage interceptionStage 1174 | + # Information about a signed exchange signature. 1175 | + # https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1 1176 | + experimental type SignedExchangeSignature extends object 1177 | + properties 1178 | + # Signed exchange signature label. 1179 | + string label 1180 | + # The hex string of signed exchange signature. 1181 | + string signature 1182 | + # Signed exchange signature integrity. 1183 | + string integrity 1184 | + # Signed exchange signature cert Url. 1185 | + optional string certUrl 1186 | + # The hex string of signed exchange signature cert sha256. 1187 | + optional string certSha256 1188 | + # Signed exchange signature validity Url. 1189 | + string validityUrl 1190 | + # Signed exchange signature date. 1191 | + integer date 1192 | + # Signed exchange signature expires. 1193 | + integer expires 1194 | + # The encoded certificates. 1195 | + optional array of string certificates 1196 | + # Information about a signed exchange header. 1197 | + # https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation 1198 | + experimental type SignedExchangeHeader extends object 1199 | + properties 1200 | + # Signed exchange request URL. 1201 | + string requestUrl 1202 | + # Signed exchange response code. 1203 | + integer responseCode 1204 | + # Signed exchange response headers. 1205 | + Headers responseHeaders 1206 | + # Signed exchange response signature. 1207 | + array of SignedExchangeSignature signatures 1208 | + # Field type for a signed exchange related error. 1209 | + experimental type SignedExchangeErrorField extends string 1210 | + enum 1211 | + signatureSig 1212 | + signatureIntegrity 1213 | + signatureCertUrl 1214 | + signatureCertSha256 1215 | + signatureValidityUrl 1216 | + signatureTimestamps 1217 | + # Information about a signed exchange response. 1218 | + experimental type SignedExchangeError extends object 1219 | + properties 1220 | + # Error message. 1221 | + string message 1222 | + # The index of the signature which caused the error. 1223 | + optional integer signatureIndex 1224 | + # The field which caused the error. 1225 | + optional SignedExchangeErrorField errorField 1226 | + # Information about a signed exchange response. 1227 | + experimental type SignedExchangeInfo extends object 1228 | + properties 1229 | + # The outer response of signed HTTP exchange which was received from network. 1230 | + Response outerResponse 1231 | + # Information about the signed exchange header. 1232 | + optional SignedExchangeHeader header 1233 | + # Security details for the signed exchange header. 1234 | + optional SecurityDetails securityDetails 1235 | + # Errors occurred while handling the signed exchagne. 1236 | + optional array of SignedExchangeError errors 1237 | + # Tells whether clearing browser cache is supported. 1238 | + deprecated command canClearBrowserCache 1239 | + returns 1240 | + # True if browser cache can be cleared. 1241 | + boolean result 1242 | + # Tells whether clearing browser cookies is supported. 1243 | + deprecated command canClearBrowserCookies 1244 | + returns 1245 | + # True if browser cookies can be cleared. 1246 | + boolean result 1247 | + # Tells whether emulation of network conditions is supported. 1248 | + deprecated command canEmulateNetworkConditions 1249 | + returns 1250 | + # True if emulation of network conditions is supported. 1251 | + boolean result 1252 | + # Clears browser cache. 1253 | + command clearBrowserCache 1254 | + # Clears browser cookies. 1255 | + command clearBrowserCookies 1256 | + # Response to Network.requestIntercepted which either modifies the request to continue with any 1257 | + # modifications, or blocks it, or completes it with the provided response bytes. If a network 1258 | + # fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted 1259 | + # event will be sent with the same InterceptionId. 1260 | + experimental command continueInterceptedRequest 1261 | + parameters 1262 | + InterceptionId interceptionId 1263 | + # If set this causes the request to fail with the given reason. Passing `Aborted` for requests 1264 | + # marked with `isNavigationRequest` also cancels the navigation. Must not be set in response 1265 | + # to an authChallenge. 1266 | + optional ErrorReason errorReason 1267 | + # If set the requests completes using with the provided base64 encoded raw response, including 1268 | + # HTTP status line and headers etc... Must not be set in response to an authChallenge. 1269 | + optional binary rawResponse 1270 | + # If set the request url will be modified in a way that's not observable by page. Must not be 1271 | + # set in response to an authChallenge. 1272 | + optional string url 1273 | + # If set this allows the request method to be overridden. Must not be set in response to an 1274 | + # authChallenge. 1275 | + optional string method 1276 | + # If set this allows postData to be set. Must not be set in response to an authChallenge. 1277 | + optional string postData 1278 | + # If set this allows the request headers to be changed. Must not be set in response to an 1279 | + # authChallenge. 1280 | + optional Headers headers 1281 | + # Response to a requestIntercepted with an authChallenge. Must not be set otherwise. 1282 | + optional AuthChallengeResponse authChallengeResponse 1283 | + # Deletes browser cookies with matching name and url or domain/path pair. 1284 | + command deleteCookies 1285 | + parameters 1286 | + # Name of the cookies to remove. 1287 | + string name 1288 | + # If specified, deletes all the cookies with the given name where domain and path match 1289 | + # provided URL. 1290 | + optional string url 1291 | + # If specified, deletes only cookies with the exact domain. 1292 | + optional string domain 1293 | + # If specified, deletes only cookies with the exact path. 1294 | + optional string path 1295 | + # Disables network tracking, prevents network events from being sent to the client. 1296 | + command disable 1297 | + # Activates emulation of network conditions. 1298 | + command emulateNetworkConditions 1299 | + parameters 1300 | + # True to emulate internet disconnection. 1301 | + boolean offline 1302 | + # Minimum latency from request sent to response headers received (ms). 1303 | + number latency 1304 | + # Maximal aggregated download throughput (bytes/sec). -1 disables download throttling. 1305 | + number downloadThroughput 1306 | + # Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling. 1307 | + number uploadThroughput 1308 | + # Connection type if known. 1309 | + optional ConnectionType connectionType 1310 | + # Enables network tracking, network events will now be delivered to the client. 1311 | + command enable 1312 | + parameters 1313 | + # Buffer size in bytes to use when preserving network payloads (XHRs, etc). 1314 | + experimental optional integer maxTotalBufferSize 1315 | + # Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). 1316 | + experimental optional integer maxResourceBufferSize 1317 | + # Longest post body size (in bytes) that would be included in requestWillBeSent notification 1318 | + optional integer maxPostDataSize 1319 | + # Returns all browser cookies. Depending on the backend support, will return detailed cookie 1320 | + # information in the `cookies` field. 1321 | + command getAllCookies 1322 | + returns 1323 | + # Array of cookie objects. 1324 | + array of Cookie cookies 1325 | + # Returns the DER-encoded certificate. 1326 | + experimental command getCertificate 1327 | + parameters 1328 | + # Origin to get certificate for. 1329 | + string origin 1330 | + returns 1331 | + array of string tableNames 1332 | + # Returns all browser cookies for the current URL. Depending on the backend support, will return 1333 | + # detailed cookie information in the `cookies` field. 1334 | + command getCookies 1335 | + parameters 1336 | + # The list of URLs for which applicable cookies will be fetched 1337 | + optional array of string urls 1338 | + returns 1339 | + # Array of cookie objects. 1340 | + array of Cookie cookies 1341 | + # Returns content served for the given request. 1342 | + command getResponseBody 1343 | + parameters 1344 | + # Identifier of the network request to get content for. 1345 | + RequestId requestId 1346 | + returns 1347 | + # Response body. 1348 | + string body 1349 | + # True, if content was sent as base64. 1350 | + boolean base64Encoded 1351 | + # Returns post data sent with the request. Returns an error when no data was sent with the request. 1352 | + command getRequestPostData 1353 | + parameters 1354 | + # Identifier of the network request to get content for. 1355 | + RequestId requestId 1356 | + returns 1357 | + # Request body string, omitting files from multipart requests 1358 | + string postData 1359 | + # Returns content served for the given currently intercepted request. 1360 | + experimental command getResponseBodyForInterception 1361 | + parameters 1362 | + # Identifier for the intercepted request to get body for. 1363 | + InterceptionId interceptionId 1364 | + returns 1365 | + # Response body. 1366 | + string body 1367 | + # True, if content was sent as base64. 1368 | + boolean base64Encoded 1369 | + # Returns a handle to the stream representing the response body. Note that after this command, 1370 | + # the intercepted request can't be continued as is -- you either need to cancel it or to provide 1371 | + # the response body. The stream only supports sequential read, IO.read will fail if the position 1372 | + # is specified. 1373 | + experimental command takeResponseBodyForInterceptionAsStream 1374 | + parameters 1375 | + InterceptionId interceptionId 1376 | + returns 1377 | + IO.StreamHandle stream 1378 | + # This method sends a new XMLHttpRequest which is identical to the original one. The following 1379 | + # parameters should be identical: method, url, async, request body, extra headers, withCredentials 1380 | + # attribute, user, password. 1381 | + experimental command replayXHR 1382 | + parameters 1383 | + # Identifier of XHR to replay. 1384 | + RequestId requestId 1385 | + # Searches for given string in response content. 1386 | + experimental command searchInResponseBody 1387 | + parameters 1388 | + # Identifier of the network response to search. 1389 | + RequestId requestId 1390 | + # String to search for. 1391 | + string query 1392 | + # If true, search is case sensitive. 1393 | + optional boolean caseSensitive 1394 | + # If true, treats string parameter as regex. 1395 | + optional boolean isRegex 1396 | + returns 1397 | + # List of search matches. 1398 | + array of Debugger.SearchMatch result 1399 | + # Blocks URLs from loading. 1400 | + experimental command setBlockedURLs 1401 | + parameters 1402 | + # URL patterns to block. Wildcards ('*') are allowed. 1403 | + array of string urls 1404 | + # Toggles ignoring of service worker for each request. 1405 | + experimental command setBypassServiceWorker 1406 | + parameters 1407 | + # Bypass service worker and load from network. 1408 | + boolean bypass 1409 | + # Toggles ignoring cache for each request. If `true`, cache will not be used. 1410 | + command setCacheDisabled 1411 | + parameters 1412 | + # Cache disabled state. 1413 | + boolean cacheDisabled 1414 | + # Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. 1415 | + command setCookie 1416 | + parameters 1417 | + # Cookie name. 1418 | + string name 1419 | + # Cookie value. 1420 | + string value 1421 | + # The request-URI to associate with the setting of the cookie. This value can affect the 1422 | + # default domain and path values of the created cookie. 1423 | + optional string url 1424 | + # Cookie domain. 1425 | + optional string domain 1426 | + # Cookie path. 1427 | + optional string path 1428 | + # True if cookie is secure. 1429 | + optional boolean secure 1430 | + # True if cookie is http-only. 1431 | + optional boolean httpOnly 1432 | + # Cookie SameSite type. 1433 | + optional CookieSameSite sameSite 1434 | + # Cookie expiration date, session cookie if not set 1435 | + optional TimeSinceEpoch expires 1436 | + returns 1437 | + # True if successfully set cookie. 1438 | + boolean success 1439 | + # Sets given cookies. 1440 | + command setCookies 1441 | + parameters 1442 | + # Cookies to be set. 1443 | + array of CookieParam cookies 1444 | + # For testing. 1445 | + experimental command setDataSizeLimitsForTest 1446 | + parameters 1447 | + # Maximum total buffer size. 1448 | + integer maxTotalSize 1449 | + # Maximum per-resource size. 1450 | + integer maxResourceSize 1451 | + # Specifies whether to always send extra HTTP headers with the requests from this page. 1452 | + command setExtraHTTPHeaders 1453 | + parameters 1454 | + # Map with extra HTTP headers. 1455 | + Headers headers 1456 | + # Sets the requests to intercept that match a the provided patterns and optionally resource types. 1457 | + experimental command setRequestInterception 1458 | + parameters 1459 | + # Requests matching any of these patterns will be forwarded and wait for the corresponding 1460 | + # continueInterceptedRequest call. 1461 | + array of RequestPattern patterns 1462 | + # Allows overriding user agent with the given string. 1463 | + command setUserAgentOverride 1464 | + redirect Emulation 1465 | + parameters 1466 | + # User agent to use. 1467 | + string userAgent 1468 | + # Browser langugage to emulate. 1469 | + optional string acceptLanguage 1470 | + # The platform navigator.platform should return. 1471 | + optional string platform 1472 | + # Fired when data chunk was received over the network. 1473 | + event dataReceived 1474 | + parameters 1475 | + # Request identifier. 1476 | + RequestId requestId 1477 | + # Timestamp. 1478 | + MonotonicTime timestamp 1479 | + # Data chunk length. 1480 | + integer dataLength 1481 | + # Actual bytes received (might be less than dataLength for compressed encodings). 1482 | + integer encodedDataLength 1483 | + # Fired when EventSource message is received. 1484 | + event eventSourceMessageReceived 1485 | + parameters 1486 | + # Request identifier. 1487 | + RequestId requestId 1488 | + # Timestamp. 1489 | + MonotonicTime timestamp 1490 | + # Message type. 1491 | + string eventName 1492 | + # Message identifier. 1493 | + string eventId 1494 | + # Message content. 1495 | + string data 1496 | + # Fired when HTTP request has failed to load. 1497 | + event loadingFailed 1498 | + parameters 1499 | + # Request identifier. 1500 | + RequestId requestId 1501 | + # Timestamp. 1502 | + MonotonicTime timestamp 1503 | + # Resource type. 1504 | + ResourceType type 1505 | + # User friendly error message. 1506 | + string errorText 1507 | + # True if loading was canceled. 1508 | + optional boolean canceled 1509 | + # The reason why loading was blocked, if any. 1510 | + optional BlockedReason blockedReason 1511 | + # Fired when HTTP request has finished loading. 1512 | + event loadingFinished 1513 | + parameters 1514 | + # Request identifier. 1515 | + RequestId requestId 1516 | + # Timestamp. 1517 | + MonotonicTime timestamp 1518 | + # Total number of bytes received for this request. 1519 | + number encodedDataLength 1520 | + # Set when 1) response was blocked by Cross-Origin Read Blocking and also 1521 | + # 2) this needs to be reported to the DevTools console. 1522 | + optional boolean shouldReportCorbBlocking 1523 | + # Details of an intercepted HTTP request, which must be either allowed, blocked, modified or 1524 | + # mocked. 1525 | + experimental event requestIntercepted 1526 | + parameters 1527 | + # Each request the page makes will have a unique id, however if any redirects are encountered 1528 | + # while processing that fetch, they will be reported with the same id as the original fetch. 1529 | + # Likewise if HTTP authentication is needed then the same fetch id will be used. 1530 | + InterceptionId interceptionId 1531 | + Request request 1532 | + # The id of the frame that initiated the request. 1533 | + Page.FrameId frameId 1534 | + # How the requested resource will be used. 1535 | + ResourceType resourceType 1536 | + # Whether this is a navigation request, which can abort the navigation completely. 1537 | + boolean isNavigationRequest 1538 | + # Set if the request is a navigation that will result in a download. 1539 | + # Only present after response is received from the server (i.e. HeadersReceived stage). 1540 | + optional boolean isDownload 1541 | + # Redirect location, only sent if a redirect was intercepted. 1542 | + optional string redirectUrl 1543 | + # Details of the Authorization Challenge encountered. If this is set then 1544 | + # continueInterceptedRequest must contain an authChallengeResponse. 1545 | + optional AuthChallenge authChallenge 1546 | + # Response error if intercepted at response stage or if redirect occurred while intercepting 1547 | + # request. 1548 | + optional ErrorReason responseErrorReason 1549 | + # Response code if intercepted at response stage or if redirect occurred while intercepting 1550 | + # request or auth retry occurred. 1551 | + optional integer responseStatusCode 1552 | + # Response headers if intercepted at the response stage or if redirect occurred while 1553 | + # intercepting request or auth retry occurred. 1554 | + optional Headers responseHeaders 1555 | + # Fired if request ended up loading from cache. 1556 | + event requestServedFromCache 1557 | + parameters 1558 | + # Request identifier. 1559 | + RequestId requestId 1560 | + # Fired when page is about to send HTTP request. 1561 | + event requestWillBeSent 1562 | + parameters 1563 | + # Request identifier. 1564 | + RequestId requestId 1565 | + # Loader identifier. Empty string if the request is fetched from worker. 1566 | + LoaderId loaderId 1567 | + # URL of the document this request is loaded for. 1568 | + string documentURL 1569 | + # Request data. 1570 | + Request request 1571 | + # Timestamp. 1572 | + MonotonicTime timestamp 1573 | + # Timestamp. 1574 | + TimeSinceEpoch wallTime 1575 | + # Request initiator. 1576 | + Initiator initiator 1577 | + # Redirect response data. 1578 | + optional Response redirectResponse 1579 | + # Type of this resource. 1580 | + optional ResourceType type 1581 | + # Frame identifier. 1582 | + optional Page.FrameId frameId 1583 | + # Whether the request is initiated by a user gesture. Defaults to false. 1584 | + optional boolean hasUserGesture 1585 | + # Fired when resource loading priority is changed 1586 | + experimental event resourceChangedPriority 1587 | + parameters 1588 | + # Request identifier. 1589 | + RequestId requestId 1590 | + # New priority 1591 | + ResourcePriority newPriority 1592 | + # Timestamp. 1593 | + MonotonicTime timestamp 1594 | + # Fired when a signed exchange was received over the network 1595 | + experimental event signedExchangeReceived 1596 | + parameters 1597 | + # Request identifier. 1598 | + RequestId requestId 1599 | + # Information about the signed exchange response. 1600 | + SignedExchangeInfo info 1601 | + # Fired when HTTP response is available. 1602 | + event responseReceived 1603 | + parameters 1604 | + # Request identifier. 1605 | + RequestId requestId 1606 | + # Loader identifier. Empty string if the request is fetched from worker. 1607 | + LoaderId loaderId 1608 | + # Timestamp. 1609 | + MonotonicTime timestamp 1610 | + # Resource type. 1611 | + ResourceType type 1612 | + # Response data. 1613 | + Response response 1614 | + # Frame identifier. 1615 | + optional Page.FrameId frameId 1616 | + # Fired when WebSocket is closed. 1617 | + event webSocketClosed 1618 | + parameters 1619 | + # Request identifier. 1620 | + RequestId requestId 1621 | + # Timestamp. 1622 | + MonotonicTime timestamp 1623 | + # Fired upon WebSocket creation. 1624 | + event webSocketCreated 1625 | + parameters 1626 | + # Request identifier. 1627 | + RequestId requestId 1628 | + # WebSocket request URL. 1629 | + string url 1630 | + # Request initiator. 1631 | + optional Initiator initiator 1632 | + # Fired when WebSocket message error occurs. 1633 | + event webSocketFrameError 1634 | + parameters 1635 | + # Request identifier. 1636 | + RequestId requestId 1637 | + # Timestamp. 1638 | + MonotonicTime timestamp 1639 | + # WebSocket error message. 1640 | + string errorMessage 1641 | + # Fired when WebSocket message is received. 1642 | + event webSocketFrameReceived 1643 | + parameters 1644 | + # Request identifier. 1645 | + RequestId requestId 1646 | + # Timestamp. 1647 | + MonotonicTime timestamp 1648 | + # WebSocket response data. 1649 | + WebSocketFrame response 1650 | + # Fired when WebSocket message is sent. 1651 | + event webSocketFrameSent 1652 | + parameters 1653 | + # Request identifier. 1654 | + RequestId requestId 1655 | + # Timestamp. 1656 | + MonotonicTime timestamp 1657 | + # WebSocket response data. 1658 | + WebSocketFrame response 1659 | + # Fired when WebSocket handshake response becomes available. 1660 | + event webSocketHandshakeResponseReceived 1661 | + parameters 1662 | + # Request identifier. 1663 | + RequestId requestId 1664 | + # Timestamp. 1665 | + MonotonicTime timestamp 1666 | + # WebSocket response data. 1667 | + WebSocketResponse response 1668 | + # Fired when WebSocket is about to initiate handshake. 1669 | + event webSocketWillSendHandshakeRequest 1670 | + parameters 1671 | + # Request identifier. 1672 | + RequestId requestId 1673 | + # Timestamp. 1674 | + MonotonicTime timestamp 1675 | + # UTC Timestamp. 1676 | + TimeSinceEpoch wallTime 1677 | + # WebSocket request data. 1678 | + WebSocketRequest request 1679 | + 1680 | +# This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object 1681 | +# that has an `id`. This `id` can be used to get additional information on the Node, resolve it into 1682 | +# the JavaScript object wrapper, etc. It is important that client receives DOM events only for the 1683 | +# nodes that are known to the client. Backend keeps track of the nodes that were sent to the client 1684 | +# and never sends the same node twice. It is client's responsibility to collect information about 1685 | +# the nodes that were sent to the client.

Note that `iframe` owner elements will return 1686 | +# corresponding document elements as their child nodes.

1687 | +domain DOM 1688 | + depends on Runtime 1689 | + # Unique DOM node identifier. 1690 | + type NodeId extends integer 1691 | + # Unique DOM node identifier used to reference a node that may not have been pushed to the 1692 | + # front-end. 1693 | + type BackendNodeId extends integer 1694 | + # Backend node with a friendly name. 1695 | + type BackendNode extends object 1696 | + properties 1697 | + # `Node`'s nodeType. 1698 | + integer nodeType 1699 | + # `Node`'s nodeName. 1700 | + string nodeName 1701 | + BackendNodeId backendNodeId 1702 | + # Pseudo element type. 1703 | + type PseudoType extends string 1704 | + enum 1705 | + first-line 1706 | + first-letter 1707 | + before 1708 | + after 1709 | + backdrop 1710 | + selection 1711 | + first-line-inherited 1712 | + scrollbar 1713 | + scrollbar-thumb 1714 | + scrollbar-button 1715 | + scrollbar-track 1716 | + scrollbar-track-piece 1717 | + scrollbar-corner 1718 | + resizer 1719 | + input-list-button 1720 | + # Shadow root type. 1721 | + type ShadowRootType extends string 1722 | + enum 1723 | + user-agent 1724 | + open 1725 | + closed 1726 | + # DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. 1727 | + # DOMNode is a base node mirror type. 1728 | + type Node extends object 1729 | + properties 1730 | + # Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend 1731 | + # will only push node with given `id` once. It is aware of all requested nodes and will only 1732 | + # fire DOM events for nodes known to the client. 1733 | + NodeId nodeId 1734 | + # The id of the parent node if any. 1735 | + optional NodeId parentId 1736 | + # The BackendNodeId for this node. 1737 | + BackendNodeId backendNodeId 1738 | + # `Node`'s nodeType. 1739 | + integer nodeType 1740 | + # `Node`'s nodeName. 1741 | + string nodeName 1742 | + # `Node`'s localName. 1743 | + string localName 1744 | + # `Node`'s nodeValue. 1745 | + string nodeValue 1746 | + # Child count for `Container` nodes. 1747 | + optional integer childNodeCount 1748 | + # Child nodes of this node when requested with children. 1749 | + optional array of Node children 1750 | + # Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`. 1751 | + optional array of string attributes 1752 | + # Document URL that `Document` or `FrameOwner` node points to. 1753 | + optional string documentURL 1754 | + # Base URL that `Document` or `FrameOwner` node uses for URL completion. 1755 | + optional string baseURL 1756 | + # `DocumentType`'s publicId. 1757 | + optional string publicId 1758 | + # `DocumentType`'s systemId. 1759 | + optional string systemId 1760 | + # `DocumentType`'s internalSubset. 1761 | + optional string internalSubset 1762 | + # `Document`'s XML version in case of XML documents. 1763 | + optional string xmlVersion 1764 | + # `Attr`'s name. 1765 | + optional string name 1766 | + # `Attr`'s value. 1767 | + optional string value 1768 | + # Pseudo element type for this node. 1769 | + optional PseudoType pseudoType 1770 | + # Shadow root type. 1771 | + optional ShadowRootType shadowRootType 1772 | + # Frame ID for frame owner elements. 1773 | + optional Page.FrameId frameId 1774 | + # Content document for frame owner elements. 1775 | + optional Node contentDocument 1776 | + # Shadow root list for given element host. 1777 | + optional array of Node shadowRoots 1778 | + # Content document fragment for template elements. 1779 | + optional Node templateContent 1780 | + # Pseudo elements associated with this node. 1781 | + optional array of Node pseudoElements 1782 | + # Import document for the HTMLImport links. 1783 | + optional Node importedDocument 1784 | + # Distributed nodes for given insertion point. 1785 | + optional array of BackendNode distributedNodes 1786 | + # Whether the node is SVG. 1787 | + optional boolean isSVG 1788 | + # A structure holding an RGBA color. 1789 | + type RGBA extends object 1790 | + properties 1791 | + # The red component, in the [0-255] range. 1792 | + integer r 1793 | + # The green component, in the [0-255] range. 1794 | + integer g 1795 | + # The blue component, in the [0-255] range. 1796 | + integer b 1797 | + # The alpha component, in the [0-1] range (default: 1). 1798 | + optional number a 1799 | + # An array of quad vertices, x immediately followed by y for each point, points clock-wise. 1800 | + type Quad extends array of number 1801 | + # Box model. 1802 | + type BoxModel extends object 1803 | + properties 1804 | + # Content box 1805 | + Quad content 1806 | + # Padding box 1807 | + Quad padding 1808 | + # Border box 1809 | + Quad border 1810 | + # Margin box 1811 | + Quad margin 1812 | + # Node width 1813 | + integer width 1814 | + # Node height 1815 | + integer height 1816 | + # Shape outside coordinates 1817 | + optional ShapeOutsideInfo shapeOutside 1818 | + # CSS Shape Outside details. 1819 | + type ShapeOutsideInfo extends object 1820 | + properties 1821 | + # Shape bounds 1822 | + Quad bounds 1823 | + # Shape coordinate details 1824 | + array of any shape 1825 | + # Margin shape bounds 1826 | + array of any marginShape 1827 | + # Rectangle. 1828 | + type Rect extends object 1829 | + properties 1830 | + # X coordinate 1831 | + number x 1832 | + # Y coordinate 1833 | + number y 1834 | + # Rectangle width 1835 | + number width 1836 | + # Rectangle height 1837 | + number height 1838 | + # Collects class names for the node with given id and all of it's child nodes. 1839 | + experimental command collectClassNamesFromSubtree 1840 | + parameters 1841 | + # Id of the node to collect class names. 1842 | + NodeId nodeId 1843 | + returns 1844 | + # Class name list. 1845 | + array of string classNames 1846 | + # Creates a deep copy of the specified node and places it into the target container before the 1847 | + # given anchor. 1848 | + experimental command copyTo 1849 | + parameters 1850 | + # Id of the node to copy. 1851 | + NodeId nodeId 1852 | + # Id of the element to drop the copy into. 1853 | + NodeId targetNodeId 1854 | + # Drop the copy before this node (if absent, the copy becomes the last child of 1855 | + # `targetNodeId`). 1856 | + optional NodeId insertBeforeNodeId 1857 | + returns 1858 | + # Id of the node clone. 1859 | + NodeId nodeId 1860 | + # Describes node given its id, does not require domain to be enabled. Does not start tracking any 1861 | + # objects, can be used for automation. 1862 | + command describeNode 1863 | + parameters 1864 | + # Identifier of the node. 1865 | + optional NodeId nodeId 1866 | + # Identifier of the backend node. 1867 | + optional BackendNodeId backendNodeId 1868 | + # JavaScript object id of the node wrapper. 1869 | + optional Runtime.RemoteObjectId objectId 1870 | + # The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the 1871 | + # entire subtree or provide an integer larger than 0. 1872 | + optional integer depth 1873 | + # Whether or not iframes and shadow roots should be traversed when returning the subtree 1874 | + # (default is false). 1875 | + optional boolean pierce 1876 | + returns 1877 | + # Node description. 1878 | + Node node 1879 | + # Disables DOM agent for the given page. 1880 | + command disable 1881 | + # Discards search results from the session with the given id. `getSearchResults` should no longer 1882 | + # be called for that search. 1883 | + experimental command discardSearchResults 1884 | + parameters 1885 | + # Unique search session identifier. 1886 | + string searchId 1887 | + # Enables DOM agent for the given page. 1888 | + command enable 1889 | + # Focuses the given element. 1890 | + command focus 1891 | + parameters 1892 | + # Identifier of the node. 1893 | + optional NodeId nodeId 1894 | + # Identifier of the backend node. 1895 | + optional BackendNodeId backendNodeId 1896 | + # JavaScript object id of the node wrapper. 1897 | + optional Runtime.RemoteObjectId objectId 1898 | + # Returns attributes for the specified node. 1899 | + command getAttributes 1900 | + parameters 1901 | + # Id of the node to retrieve attibutes for. 1902 | + NodeId nodeId 1903 | + returns 1904 | + # An interleaved array of node attribute names and values. 1905 | + array of string attributes 1906 | + # Returns boxes for the given node. 1907 | + command getBoxModel 1908 | + parameters 1909 | + # Identifier of the node. 1910 | + optional NodeId nodeId 1911 | + # Identifier of the backend node. 1912 | + optional BackendNodeId backendNodeId 1913 | + # JavaScript object id of the node wrapper. 1914 | + optional Runtime.RemoteObjectId objectId 1915 | + returns 1916 | + # Box model for the node. 1917 | + BoxModel model 1918 | + # Returns quads that describe node position on the page. This method 1919 | + # might return multiple quads for inline nodes. 1920 | + experimental command getContentQuads 1921 | + parameters 1922 | + # Identifier of the node. 1923 | + optional NodeId nodeId 1924 | + # Identifier of the backend node. 1925 | + optional BackendNodeId backendNodeId 1926 | + # JavaScript object id of the node wrapper. 1927 | + optional Runtime.RemoteObjectId objectId 1928 | + returns 1929 | + # Quads that describe node layout relative to viewport. 1930 | + array of Quad quads 1931 | + # Returns the root DOM node (and optionally the subtree) to the caller. 1932 | + command getDocument 1933 | + parameters 1934 | + # The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the 1935 | + # entire subtree or provide an integer larger than 0. 1936 | + optional integer depth 1937 | + # Whether or not iframes and shadow roots should be traversed when returning the subtree 1938 | + # (default is false). 1939 | + optional boolean pierce 1940 | + returns 1941 | + # Resulting node. 1942 | + Node root 1943 | + # Returns the root DOM node (and optionally the subtree) to the caller. 1944 | + command getFlattenedDocument 1945 | + parameters 1946 | + # The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the 1947 | + # entire subtree or provide an integer larger than 0. 1948 | + optional integer depth 1949 | + # Whether or not iframes and shadow roots should be traversed when returning the subtree 1950 | + # (default is false). 1951 | + optional boolean pierce 1952 | + returns 1953 | + # Resulting node. 1954 | + array of Node nodes 1955 | + # Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is 1956 | + # either returned or not. 1957 | + experimental command getNodeForLocation 1958 | + parameters 1959 | + # X coordinate. 1960 | + integer x 1961 | + # Y coordinate. 1962 | + integer y 1963 | + # False to skip to the nearest non-UA shadow root ancestor (default: false). 1964 | + optional boolean includeUserAgentShadowDOM 1965 | + returns 1966 | + # Resulting node. 1967 | + BackendNodeId backendNodeId 1968 | + # Id of the node at given coordinates, only when enabled and requested document. 1969 | + optional NodeId nodeId 1970 | + # Returns node's HTML markup. 1971 | + command getOuterHTML 1972 | + parameters 1973 | + # Identifier of the node. 1974 | + optional NodeId nodeId 1975 | + # Identifier of the backend node. 1976 | + optional BackendNodeId backendNodeId 1977 | + # JavaScript object id of the node wrapper. 1978 | + optional Runtime.RemoteObjectId objectId 1979 | + returns 1980 | + # Outer HTML markup. 1981 | + string outerHTML 1982 | + # Returns the id of the nearest ancestor that is a relayout boundary. 1983 | + experimental command getRelayoutBoundary 1984 | + parameters 1985 | + # Id of the node. 1986 | + NodeId nodeId 1987 | + returns 1988 | + # Relayout boundary node id for the given node. 1989 | + NodeId nodeId 1990 | + # Returns search results from given `fromIndex` to given `toIndex` from the search with the given 1991 | + # identifier. 1992 | + experimental command getSearchResults 1993 | + parameters 1994 | + # Unique search session identifier. 1995 | + string searchId 1996 | + # Start index of the search result to be returned. 1997 | + integer fromIndex 1998 | + # End index of the search result to be returned. 1999 | + integer toIndex 2000 | + returns 2001 | + # Ids of the search result nodes. 2002 | + array of NodeId nodeIds 2003 | + # Hides any highlight. 2004 | + command hideHighlight 2005 | + # Use 'Overlay.hideHighlight' instead 2006 | + redirect Overlay 2007 | + # Highlights DOM node. 2008 | + command highlightNode 2009 | + # Use 'Overlay.highlightNode' instead 2010 | + redirect Overlay 2011 | + # Highlights given rectangle. 2012 | + command highlightRect 2013 | + # Use 'Overlay.highlightRect' instead 2014 | + redirect Overlay 2015 | + # Marks last undoable state. 2016 | + experimental command markUndoableState 2017 | + # Moves node into the new container, places it before the given anchor. 2018 | + command moveTo 2019 | + parameters 2020 | + # Id of the node to move. 2021 | + NodeId nodeId 2022 | + # Id of the element to drop the moved node into. 2023 | + NodeId targetNodeId 2024 | + # Drop node before this one (if absent, the moved node becomes the last child of 2025 | + # `targetNodeId`). 2026 | + optional NodeId insertBeforeNodeId 2027 | + returns 2028 | + # New id of the moved node. 2029 | + NodeId nodeId 2030 | + # Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or 2031 | + # `cancelSearch` to end this search session. 2032 | + experimental command performSearch 2033 | + parameters 2034 | + # Plain text or query selector or XPath search query. 2035 | + string query 2036 | + # True to search in user agent shadow DOM. 2037 | + optional boolean includeUserAgentShadowDOM 2038 | + returns 2039 | + # Unique search session identifier. 2040 | + string searchId 2041 | + # Number of search results. 2042 | + integer resultCount 2043 | + # Requests that the node is sent to the caller given its path. // FIXME, use XPath 2044 | + experimental command pushNodeByPathToFrontend 2045 | + parameters 2046 | + # Path to node in the proprietary format. 2047 | + string path 2048 | + returns 2049 | + # Id of the node for given path. 2050 | + NodeId nodeId 2051 | + # Requests that a batch of nodes is sent to the caller given their backend node ids. 2052 | + experimental command pushNodesByBackendIdsToFrontend 2053 | + parameters 2054 | + # The array of backend node ids. 2055 | + array of BackendNodeId backendNodeIds 2056 | + returns 2057 | + # The array of ids of pushed nodes that correspond to the backend ids specified in 2058 | + # backendNodeIds. 2059 | + array of NodeId nodeIds 2060 | + # Executes `querySelector` on a given node. 2061 | + command querySelector 2062 | + parameters 2063 | + # Id of the node to query upon. 2064 | + NodeId nodeId 2065 | + # Selector string. 2066 | + string selector 2067 | + returns 2068 | + # Query selector result. 2069 | + NodeId nodeId 2070 | + # Executes `querySelectorAll` on a given node. 2071 | + command querySelectorAll 2072 | + parameters 2073 | + # Id of the node to query upon. 2074 | + NodeId nodeId 2075 | + # Selector string. 2076 | + string selector 2077 | + returns 2078 | + # Query selector result. 2079 | + array of NodeId nodeIds 2080 | + # Re-does the last undone action. 2081 | + experimental command redo 2082 | + # Removes attribute with given name from an element with given id. 2083 | + command removeAttribute 2084 | + parameters 2085 | + # Id of the element to remove attribute from. 2086 | + NodeId nodeId 2087 | + # Name of the attribute to remove. 2088 | + string name 2089 | + # Removes node with given id. 2090 | + command removeNode 2091 | + parameters 2092 | + # Id of the node to remove. 2093 | + NodeId nodeId 2094 | + # Requests that children of the node with given id are returned to the caller in form of 2095 | + # `setChildNodes` events where not only immediate children are retrieved, but all children down to 2096 | + # the specified depth. 2097 | + command requestChildNodes 2098 | + parameters 2099 | + # Id of the node to get children for. 2100 | + NodeId nodeId 2101 | + # The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the 2102 | + # entire subtree or provide an integer larger than 0. 2103 | + optional integer depth 2104 | + # Whether or not iframes and shadow roots should be traversed when returning the sub-tree 2105 | + # (default is false). 2106 | + optional boolean pierce 2107 | + # Requests that the node is sent to the caller given the JavaScript node object reference. All 2108 | + # nodes that form the path from the node to the root are also sent to the client as a series of 2109 | + # `setChildNodes` notifications. 2110 | + command requestNode 2111 | + parameters 2112 | + # JavaScript object id to convert into node. 2113 | + Runtime.RemoteObjectId objectId 2114 | + returns 2115 | + # Node id for given object. 2116 | + NodeId nodeId 2117 | + # Resolves the JavaScript node object for a given NodeId or BackendNodeId. 2118 | + command resolveNode 2119 | + parameters 2120 | + # Id of the node to resolve. 2121 | + optional NodeId nodeId 2122 | + # Backend identifier of the node to resolve. 2123 | + optional DOM.BackendNodeId backendNodeId 2124 | + # Symbolic group name that can be used to release multiple objects. 2125 | + optional string objectGroup 2126 | + # Execution context in which to resolve the node. 2127 | + optional Runtime.ExecutionContextId executionContextId 2128 | + returns 2129 | + # JavaScript object wrapper for given node. 2130 | + Runtime.RemoteObject object 2131 | + # Sets attribute for an element with given id. 2132 | + command setAttributeValue 2133 | + parameters 2134 | + # Id of the element to set attribute for. 2135 | + NodeId nodeId 2136 | + # Attribute name. 2137 | + string name 2138 | + # Attribute value. 2139 | + string value 2140 | + # Sets attributes on element with given id. This method is useful when user edits some existing 2141 | + # attribute value and types in several attribute name/value pairs. 2142 | + command setAttributesAsText 2143 | + parameters 2144 | + # Id of the element to set attributes for. 2145 | + NodeId nodeId 2146 | + # Text with a number of attributes. Will parse this text using HTML parser. 2147 | + string text 2148 | + # Attribute name to replace with new attributes derived from text in case text parsed 2149 | + # successfully. 2150 | + optional string name 2151 | + # Sets files for the given file input element. 2152 | + command setFileInputFiles 2153 | + parameters 2154 | + # Array of file paths to set. 2155 | + array of string files 2156 | + # Identifier of the node. 2157 | + optional NodeId nodeId 2158 | + # Identifier of the backend node. 2159 | + optional BackendNodeId backendNodeId 2160 | + # JavaScript object id of the node wrapper. 2161 | + optional Runtime.RemoteObjectId objectId 2162 | + # Returns file information for the given 2163 | + # File wrapper. 2164 | + experimental command getFileInfo 2165 | + parameters 2166 | + # JavaScript object id of the node wrapper. 2167 | + Runtime.RemoteObjectId objectId 2168 | + returns 2169 | + string path 2170 | + # Enables console to refer to the node with given id via $x (see Command Line API for more details 2171 | + # $x functions). 2172 | + experimental command setInspectedNode 2173 | + parameters 2174 | + # DOM node id to be accessible by means of $x command line API. 2175 | + NodeId nodeId 2176 | + # Sets node name for a node with given id. 2177 | + command setNodeName 2178 | + parameters 2179 | + # Id of the node to set name for. 2180 | + NodeId nodeId 2181 | + # New node's name. 2182 | + string name 2183 | + returns 2184 | + # New node's id. 2185 | + NodeId nodeId 2186 | + # Sets node value for a node with given id. 2187 | + command setNodeValue 2188 | + parameters 2189 | + # Id of the node to set value for. 2190 | + NodeId nodeId 2191 | + # New node's value. 2192 | + string value 2193 | + # Sets node HTML markup, returns new node id. 2194 | + command setOuterHTML 2195 | + parameters 2196 | + # Id of the node to set markup for. 2197 | + NodeId nodeId 2198 | + # Outer HTML markup to set. 2199 | + string outerHTML 2200 | + # Undoes the last performed action. 2201 | + experimental command undo 2202 | + # Returns iframe node that owns iframe with the given domain. 2203 | + experimental command getFrameOwner 2204 | + parameters 2205 | + Page.FrameId frameId 2206 | + returns 2207 | + # Resulting node. 2208 | + BackendNodeId backendNodeId 2209 | + # Id of the node at given coordinates, only when enabled and requested document. 2210 | + optional NodeId nodeId 2211 | + # Fired when `Element`'s attribute is modified. 2212 | + event attributeModified 2213 | + parameters 2214 | + # Id of the node that has changed. 2215 | + NodeId nodeId 2216 | + # Attribute name. 2217 | + string name 2218 | + # Attribute value. 2219 | + string value 2220 | + # Fired when `Element`'s attribute is removed. 2221 | + event attributeRemoved 2222 | + parameters 2223 | + # Id of the node that has changed. 2224 | + NodeId nodeId 2225 | + # A ttribute name. 2226 | + string name 2227 | + # Mirrors `DOMCharacterDataModified` event. 2228 | + event characterDataModified 2229 | + parameters 2230 | + # Id of the node that has changed. 2231 | + NodeId nodeId 2232 | + # New text value. 2233 | + string characterData 2234 | + # Fired when `Container`'s child node count has changed. 2235 | + event childNodeCountUpdated 2236 | + parameters 2237 | + # Id of the node that has changed. 2238 | + NodeId nodeId 2239 | + # New node count. 2240 | + integer childNodeCount 2241 | + # Mirrors `DOMNodeInserted` event. 2242 | + event childNodeInserted 2243 | + parameters 2244 | + # Id of the node that has changed. 2245 | + NodeId parentNodeId 2246 | + # If of the previous siblint. 2247 | + NodeId previousNodeId 2248 | + # Inserted node data. 2249 | + Node node 2250 | + # Mirrors `DOMNodeRemoved` event. 2251 | + event childNodeRemoved 2252 | + parameters 2253 | + # Parent id. 2254 | + NodeId parentNodeId 2255 | + # Id of the node that has been removed. 2256 | + NodeId nodeId 2257 | + # Called when distrubution is changed. 2258 | + experimental event distributedNodesUpdated 2259 | + parameters 2260 | + # Insertion point where distrubuted nodes were updated. 2261 | + NodeId insertionPointId 2262 | + # Distributed nodes for given insertion point. 2263 | + array of BackendNode distributedNodes 2264 | + # Fired when `Document` has been totally updated. Node ids are no longer valid. 2265 | + event documentUpdated 2266 | + # Fired when `Element`'s inline style is modified via a CSS property modification. 2267 | + experimental event inlineStyleInvalidated 2268 | + parameters 2269 | + # Ids of the nodes for which the inline styles have been invalidated. 2270 | + array of NodeId nodeIds 2271 | + # Called when a pseudo element is added to an element. 2272 | + experimental event pseudoElementAdded 2273 | + parameters 2274 | + # Pseudo element's parent element id. 2275 | + NodeId parentId 2276 | + # The added pseudo element. 2277 | + Node pseudoElement 2278 | + # Called when a pseudo element is removed from an element. 2279 | + experimental event pseudoElementRemoved 2280 | + parameters 2281 | + # Pseudo element's parent element id. 2282 | + NodeId parentId 2283 | + # The removed pseudo element id. 2284 | + NodeId pseudoElementId 2285 | + # Fired when backend wants to provide client with the missing DOM structure. This happens upon 2286 | + # most of the calls requesting node ids. 2287 | + event setChildNodes 2288 | + parameters 2289 | + # Parent node id to populate with children. 2290 | + NodeId parentId 2291 | + # Child nodes array. 2292 | + array of Node nodes 2293 | + # Called when shadow root is popped from the element. 2294 | + experimental event shadowRootPopped 2295 | + parameters 2296 | + # Host element id. 2297 | + NodeId hostId 2298 | + # Shadow root id. 2299 | + NodeId rootId 2300 | + # Called when shadow root is pushed into the element. 2301 | + experimental event shadowRootPushed 2302 | + parameters 2303 | + # Host element id. 2304 | + NodeId hostId 2305 | + # Shadow root. 2306 | + Node root 2307 | + 2308 | +# This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) 2309 | +# have an associated `id` used in subsequent operations on the related object. Each object type has 2310 | +# a specific `id` structure, and those are not interchangeable between objects of different kinds. 2311 | +# CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client 2312 | +# can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and 2313 | +# subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods. 2314 | +experimental domain CSS 2315 | + depends on DOM 2316 | + type StyleSheetId extends string 2317 | + # Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent 2318 | + # stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via 2319 | + # inspector" rules), "regular" for regular stylesheets. 2320 | + type StyleSheetOrigin extends string 2321 | + enum 2322 | + injected 2323 | + user-agent 2324 | + inspector 2325 | + regular 2326 | + # CSS rule collection for a single pseudo style. 2327 | + type PseudoElementMatches extends object 2328 | + properties 2329 | + # Pseudo element type. 2330 | + DOM.PseudoType pseudoType 2331 | + # Matches of CSS rules applicable to the pseudo style. 2332 | + array of RuleMatch matches 2333 | + # Inherited CSS rule collection from ancestor node. 2334 | + type InheritedStyleEntry extends object 2335 | + properties 2336 | + # The ancestor node's inline style, if any, in the style inheritance chain. 2337 | + optional CSSStyle inlineStyle 2338 | + # Matches of CSS rules matching the ancestor node in the style inheritance chain. 2339 | + array of RuleMatch matchedCSSRules 2340 | + # Match data for a CSS rule. 2341 | + type RuleMatch extends object 2342 | + properties 2343 | + # CSS rule in the match. 2344 | + CSSRule rule 2345 | + # Matching selector indices in the rule's selectorList selectors (0-based). 2346 | + array of integer matchingSelectors 2347 | + # Data for a simple selector (these are delimited by commas in a selector list). 2348 | + type Value extends object 2349 | + properties 2350 | + # Value text. 2351 | + string text 2352 | + # Value range in the underlying resource (if available). 2353 | + optional SourceRange range 2354 | + # Selector list data. 2355 | + type SelectorList extends object 2356 | + properties 2357 | + # Selectors in the list. 2358 | + array of Value selectors 2359 | + # Rule selector text. 2360 | + string text 2361 | + # CSS stylesheet metainformation. 2362 | + type CSSStyleSheetHeader extends object 2363 | + properties 2364 | + # The stylesheet identifier. 2365 | + StyleSheetId styleSheetId 2366 | + # Owner frame identifier. 2367 | + Page.FrameId frameId 2368 | + # Stylesheet resource URL. 2369 | + string sourceURL 2370 | + # URL of source map associated with the stylesheet (if any). 2371 | + optional string sourceMapURL 2372 | + # Stylesheet origin. 2373 | + StyleSheetOrigin origin 2374 | + # Stylesheet title. 2375 | + string title 2376 | + # The backend id for the owner node of the stylesheet. 2377 | + optional DOM.BackendNodeId ownerNode 2378 | + # Denotes whether the stylesheet is disabled. 2379 | + boolean disabled 2380 | + # Whether the sourceURL field value comes from the sourceURL comment. 2381 | + optional boolean hasSourceURL 2382 | + # Whether this stylesheet is created for STYLE tag by parser. This flag is not set for 2383 | + # document.written STYLE tags. 2384 | + boolean isInline 2385 | + # Line offset of the stylesheet within the resource (zero based). 2386 | + number startLine 2387 | + # Column offset of the stylesheet within the resource (zero based). 2388 | + number startColumn 2389 | + # Size of the content (in characters). 2390 | + number length 2391 | + # CSS rule representation. 2392 | + type CSSRule extends object 2393 | + properties 2394 | + # The css style sheet identifier (absent for user agent stylesheet and user-specified 2395 | + # stylesheet rules) this rule came from. 2396 | + optional StyleSheetId styleSheetId 2397 | + # Rule selector data. 2398 | + SelectorList selectorList 2399 | + # Parent stylesheet's origin. 2400 | + StyleSheetOrigin origin 2401 | + # Associated style declaration. 2402 | + CSSStyle style 2403 | + # Media list array (for rules involving media queries). The array enumerates media queries 2404 | + # starting with the innermost one, going outwards. 2405 | + optional array of CSSMedia media 2406 | + # CSS coverage information. 2407 | + type RuleUsage extends object 2408 | + properties 2409 | + # The css style sheet identifier (absent for user agent stylesheet and user-specified 2410 | + # stylesheet rules) this rule came from. 2411 | + StyleSheetId styleSheetId 2412 | + # Offset of the start of the rule (including selector) from the beginning of the stylesheet. 2413 | + number startOffset 2414 | + # Offset of the end of the rule body from the beginning of the stylesheet. 2415 | + number endOffset 2416 | + # Indicates whether the rule was actually used by some element in the page. 2417 | + boolean used 2418 | + # Text range within a resource. All numbers are zero-based. 2419 | + type SourceRange extends object 2420 | + properties 2421 | + # Start line of range. 2422 | + integer startLine 2423 | + # Start column of range (inclusive). 2424 | + integer startColumn 2425 | + # End line of range 2426 | + integer endLine 2427 | + # End column of range (exclusive). 2428 | + integer endColumn 2429 | + type ShorthandEntry extends object 2430 | + properties 2431 | + # Shorthand name. 2432 | + string name 2433 | + # Shorthand value. 2434 | + string value 2435 | + # Whether the property has "!important" annotation (implies `false` if absent). 2436 | + optional boolean important 2437 | + type CSSComputedStyleProperty extends object 2438 | + properties 2439 | + # Computed style property name. 2440 | + string name 2441 | + # Computed style property value. 2442 | + string value 2443 | + # CSS style representation. 2444 | + type CSSStyle extends object 2445 | + properties 2446 | + # The css style sheet identifier (absent for user agent stylesheet and user-specified 2447 | + # stylesheet rules) this rule came from. 2448 | + optional StyleSheetId styleSheetId 2449 | + # CSS properties in the style. 2450 | + array of CSSProperty cssProperties 2451 | + # Computed values for all shorthands found in the style. 2452 | + array of ShorthandEntry shorthandEntries 2453 | + # Style declaration text (if available). 2454 | + optional string cssText 2455 | + # Style declaration range in the enclosing stylesheet (if available). 2456 | + optional SourceRange range 2457 | + # CSS property declaration data. 2458 | + type CSSProperty extends object 2459 | + properties 2460 | + # The property name. 2461 | + string name 2462 | + # The property value. 2463 | + string value 2464 | + # Whether the property has "!important" annotation (implies `false` if absent). 2465 | + optional boolean important 2466 | + # Whether the property is implicit (implies `false` if absent). 2467 | + optional boolean implicit 2468 | + # The full property text as specified in the style. 2469 | + optional string text 2470 | + # Whether the property is understood by the browser (implies `true` if absent). 2471 | + optional boolean parsedOk 2472 | + # Whether the property is disabled by the user (present for source-based properties only). 2473 | + optional boolean disabled 2474 | + # The entire property range in the enclosing style declaration (if available). 2475 | + optional SourceRange range 2476 | + # CSS media rule descriptor. 2477 | + type CSSMedia extends object 2478 | + properties 2479 | + # Media query text. 2480 | + string text 2481 | + # Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if 2482 | + # specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked 2483 | + # stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline 2484 | + # stylesheet's STYLE tag. 2485 | + enum source 2486 | + mediaRule 2487 | + importRule 2488 | + linkedSheet 2489 | + inlineSheet 2490 | + # URL of the document containing the media query description. 2491 | + optional string sourceURL 2492 | + # The associated rule (@media or @import) header range in the enclosing stylesheet (if 2493 | + # available). 2494 | + optional SourceRange range 2495 | + # Identifier of the stylesheet containing this object (if exists). 2496 | + optional StyleSheetId styleSheetId 2497 | + # Array of media queries. 2498 | + optional array of MediaQuery mediaList 2499 | + # Media query descriptor. 2500 | + type MediaQuery extends object 2501 | + properties 2502 | + # Array of media query expressions. 2503 | + array of MediaQueryExpression expressions 2504 | + # Whether the media query condition is satisfied. 2505 | + boolean active 2506 | + # Media query expression descriptor. 2507 | + type MediaQueryExpression extends object 2508 | + properties 2509 | + # Media query expression value. 2510 | + number value 2511 | + # Media query expression units. 2512 | + string unit 2513 | + # Media query expression feature. 2514 | + string feature 2515 | + # The associated range of the value text in the enclosing stylesheet (if available). 2516 | + optional SourceRange valueRange 2517 | + # Computed length of media query expression (if applicable). 2518 | + optional number computedLength 2519 | + # Information about amount of glyphs that were rendered with given font. 2520 | + type PlatformFontUsage extends object 2521 | + properties 2522 | + # Font's family name reported by platform. 2523 | + string familyName 2524 | + # Indicates if the font was downloaded or resolved locally. 2525 | + boolean isCustomFont 2526 | + # Amount of glyphs that were rendered with this font. 2527 | + number glyphCount 2528 | + # Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions 2529 | + type FontFace extends object 2530 | + properties 2531 | + # The font-family. 2532 | + string fontFamily 2533 | + # The font-style. 2534 | + string fontStyle 2535 | + # The font-variant. 2536 | + string fontVariant 2537 | + # The font-weight. 2538 | + string fontWeight 2539 | + # The font-stretch. 2540 | + string fontStretch 2541 | + # The unicode-range. 2542 | + string unicodeRange 2543 | + # The src. 2544 | + string src 2545 | + # The resolved platform font family 2546 | + string platformFontFamily 2547 | + # CSS keyframes rule representation. 2548 | + type CSSKeyframesRule extends object 2549 | + properties 2550 | + # Animation name. 2551 | + Value animationName 2552 | + # List of keyframes. 2553 | + array of CSSKeyframeRule keyframes 2554 | + # CSS keyframe rule representation. 2555 | + type CSSKeyframeRule extends object 2556 | + properties 2557 | + # The css style sheet identifier (absent for user agent stylesheet and user-specified 2558 | + # stylesheet rules) this rule came from. 2559 | + optional StyleSheetId styleSheetId 2560 | + # Parent stylesheet's origin. 2561 | + StyleSheetOrigin origin 2562 | + # Associated key text. 2563 | + Value keyText 2564 | + # Associated style declaration. 2565 | + CSSStyle style 2566 | + # A descriptor of operation to mutate style declaration text. 2567 | + type StyleDeclarationEdit extends object 2568 | + properties 2569 | + # The css style sheet identifier. 2570 | + StyleSheetId styleSheetId 2571 | + # The range of the style text in the enclosing stylesheet. 2572 | + SourceRange range 2573 | + # New style text. 2574 | + string text 2575 | + # Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the 2576 | + # position specified by `location`. 2577 | + command addRule 2578 | + parameters 2579 | + # The css style sheet identifier where a new rule should be inserted. 2580 | + StyleSheetId styleSheetId 2581 | + # The text of a new rule. 2582 | + string ruleText 2583 | + # Text position of a new rule in the target style sheet. 2584 | + SourceRange location 2585 | + returns 2586 | + # The newly created rule. 2587 | + CSSRule rule 2588 | + # Returns all class names from specified stylesheet. 2589 | + command collectClassNames 2590 | + parameters 2591 | + StyleSheetId styleSheetId 2592 | + returns 2593 | + # Class name list. 2594 | + array of string classNames 2595 | + # Creates a new special "via-inspector" stylesheet in the frame with given `frameId`. 2596 | + command createStyleSheet 2597 | + parameters 2598 | + # Identifier of the frame where "via-inspector" stylesheet should be created. 2599 | + Page.FrameId frameId 2600 | + returns 2601 | + # Identifier of the created "via-inspector" stylesheet. 2602 | + StyleSheetId styleSheetId 2603 | + # Disables the CSS agent for the given page. 2604 | + command disable 2605 | + # Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been 2606 | + # enabled until the result of this command is received. 2607 | + command enable 2608 | + # Ensures that the given node will have specified pseudo-classes whenever its style is computed by 2609 | + # the browser. 2610 | + command forcePseudoState 2611 | + parameters 2612 | + # The element id for which to force the pseudo state. 2613 | + DOM.NodeId nodeId 2614 | + # Element pseudo classes to force when computing the element's style. 2615 | + array of string forcedPseudoClasses 2616 | + command getBackgroundColors 2617 | + parameters 2618 | + # Id of the node to get background colors for. 2619 | + DOM.NodeId nodeId 2620 | + returns 2621 | + # The range of background colors behind this element, if it contains any visible text. If no 2622 | + # visible text is present, this will be undefined. In the case of a flat background color, 2623 | + # this will consist of simply that color. In the case of a gradient, this will consist of each 2624 | + # of the color stops. For anything more complicated, this will be an empty array. Images will 2625 | + # be ignored (as if the image had failed to load). 2626 | + optional array of string backgroundColors 2627 | + # The computed font size for this node, as a CSS computed value string (e.g. '12px'). 2628 | + optional string computedFontSize 2629 | + # The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or 2630 | + # '100'). 2631 | + optional string computedFontWeight 2632 | + # Returns the computed style for a DOM node identified by `nodeId`. 2633 | + command getComputedStyleForNode 2634 | + parameters 2635 | + DOM.NodeId nodeId 2636 | + returns 2637 | + # Computed style for the specified DOM node. 2638 | + array of CSSComputedStyleProperty computedStyle 2639 | + # Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM 2640 | + # attributes) for a DOM node identified by `nodeId`. 2641 | + command getInlineStylesForNode 2642 | + parameters 2643 | + DOM.NodeId nodeId 2644 | + returns 2645 | + # Inline style for the specified DOM node. 2646 | + optional CSSStyle inlineStyle 2647 | + # Attribute-defined element style (e.g. resulting from "width=20 height=100%"). 2648 | + optional CSSStyle attributesStyle 2649 | + # Returns requested styles for a DOM node identified by `nodeId`. 2650 | + command getMatchedStylesForNode 2651 | + parameters 2652 | + DOM.NodeId nodeId 2653 | + returns 2654 | + # Inline style for the specified DOM node. 2655 | + optional CSSStyle inlineStyle 2656 | + # Attribute-defined element style (e.g. resulting from "width=20 height=100%"). 2657 | + optional CSSStyle attributesStyle 2658 | + # CSS rules matching this node, from all applicable stylesheets. 2659 | + optional array of RuleMatch matchedCSSRules 2660 | + # Pseudo style matches for this node. 2661 | + optional array of PseudoElementMatches pseudoElements 2662 | + # A chain of inherited styles (from the immediate node parent up to the DOM tree root). 2663 | + optional array of InheritedStyleEntry inherited 2664 | + # A list of CSS keyframed animations matching this node. 2665 | + optional array of CSSKeyframesRule cssKeyframesRules 2666 | + # Returns all media queries parsed by the rendering engine. 2667 | + command getMediaQueries 2668 | + returns 2669 | + array of CSSMedia medias 2670 | + # Requests information about platform fonts which we used to render child TextNodes in the given 2671 | + # node. 2672 | + command getPlatformFontsForNode 2673 | + parameters 2674 | + DOM.NodeId nodeId 2675 | + returns 2676 | + # Usage statistics for every employed platform font. 2677 | + array of PlatformFontUsage fonts 2678 | + # Returns the current textual content for a stylesheet. 2679 | + command getStyleSheetText 2680 | + parameters 2681 | + StyleSheetId styleSheetId 2682 | + returns 2683 | + # The stylesheet text. 2684 | + string text 2685 | + # Find a rule with the given active property for the given node and set the new value for this 2686 | + # property 2687 | + command setEffectivePropertyValueForNode 2688 | + parameters 2689 | + # The element id for which to set property. 2690 | + DOM.NodeId nodeId 2691 | + string propertyName 2692 | + string value 2693 | + # Modifies the keyframe rule key text. 2694 | + command setKeyframeKey 2695 | + parameters 2696 | + StyleSheetId styleSheetId 2697 | + SourceRange range 2698 | + string keyText 2699 | + returns 2700 | + # The resulting key text after modification. 2701 | + Value keyText 2702 | + # Modifies the rule selector. 2703 | + command setMediaText 2704 | + parameters 2705 | + StyleSheetId styleSheetId 2706 | + SourceRange range 2707 | + string text 2708 | + returns 2709 | + # The resulting CSS media rule after modification. 2710 | + CSSMedia media 2711 | + # Modifies the rule selector. 2712 | + command setRuleSelector 2713 | + parameters 2714 | + StyleSheetId styleSheetId 2715 | + SourceRange range 2716 | + string selector 2717 | + returns 2718 | + # The resulting selector list after modification. 2719 | + SelectorList selectorList 2720 | + # Sets the new stylesheet text. 2721 | + command setStyleSheetText 2722 | + parameters 2723 | + StyleSheetId styleSheetId 2724 | + string text 2725 | + returns 2726 | + # URL of source map associated with script (if any). 2727 | + optional string sourceMapURL 2728 | + # Applies specified style edits one after another in the given order. 2729 | + command setStyleTexts 2730 | + parameters 2731 | + array of StyleDeclarationEdit edits 2732 | + returns 2733 | + # The resulting styles after modification. 2734 | + array of CSSStyle styles 2735 | + # Enables the selector recording. 2736 | + command startRuleUsageTracking 2737 | + # Stop tracking rule usage and return the list of rules that were used since last call to 2738 | + # `takeCoverageDelta` (or since start of coverage instrumentation) 2739 | + command stopRuleUsageTracking 2740 | + returns 2741 | + array of RuleUsage ruleUsage 2742 | + # Obtain list of rules that became used since last call to this method (or since start of coverage 2743 | + # instrumentation) 2744 | + command takeCoverageDelta 2745 | + returns 2746 | + array of RuleUsage coverage 2747 | + # Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded 2748 | + # web font 2749 | + event fontsUpdated 2750 | + parameters 2751 | + # The web font that has loaded. 2752 | + optional FontFace font 2753 | + # Fires whenever a MediaQuery result changes (for example, after a browser window has been 2754 | + # resized.) The current implementation considers only viewport-dependent media features. 2755 | + event mediaQueryResultChanged 2756 | + # Fired whenever an active document stylesheet is added. 2757 | + event styleSheetAdded 2758 | + parameters 2759 | + # Added stylesheet metainfo. 2760 | + CSSStyleSheetHeader header 2761 | + # Fired whenever a stylesheet is changed as a result of the client operation. 2762 | + event styleSheetChanged 2763 | + parameters 2764 | + StyleSheetId styleSheetId 2765 | + # Fired whenever an active document stylesheet is removed. 2766 | + event styleSheetRemoved 2767 | + parameters 2768 | + # Identifier of the removed stylesheet. 2769 | + StyleSheetId styleSheetId 2770 | + 2771 | +# This domain provides various functionality related to drawing atop the inspected page. 2772 | +experimental domain Overlay 2773 | + depends on DOM 2774 | + depends on Page 2775 | + depends on Runtime 2776 | + # Configuration data for the highlighting of page elements. 2777 | + type HighlightConfig extends object 2778 | + properties 2779 | + # Whether the node info tooltip should be shown (default: false). 2780 | + optional boolean showInfo 2781 | + # Whether the node styles in the tooltip (default: false). 2782 | + optional boolean showStyles 2783 | + # Whether the rulers should be shown (default: false). 2784 | + optional boolean showRulers 2785 | + # Whether the extension lines from node to the rulers should be shown (default: false). 2786 | + optional boolean showExtensionLines 2787 | + # The content box highlight fill color (default: transparent). 2788 | + optional DOM.RGBA contentColor 2789 | + # The padding highlight fill color (default: transparent). 2790 | + optional DOM.RGBA paddingColor 2791 | + # The border highlight fill color (default: transparent). 2792 | + optional DOM.RGBA borderColor 2793 | + # The margin highlight fill color (default: transparent). 2794 | + optional DOM.RGBA marginColor 2795 | + # The event target element highlight fill color (default: transparent). 2796 | + optional DOM.RGBA eventTargetColor 2797 | + # The shape outside fill color (default: transparent). 2798 | + optional DOM.RGBA shapeColor 2799 | + # The shape margin fill color (default: transparent). 2800 | + optional DOM.RGBA shapeMarginColor 2801 | + # The grid layout color (default: transparent). 2802 | + optional DOM.RGBA cssGridColor 2803 | + type InspectMode extends string 2804 | + enum 2805 | + searchForNode 2806 | + searchForUAShadowDOM 2807 | + captureAreaScreenshot 2808 | + none 2809 | + # Disables domain notifications. 2810 | + command disable 2811 | + # Enables domain notifications. 2812 | + command enable 2813 | + # For testing. 2814 | + command getHighlightObjectForTest 2815 | + parameters 2816 | + # Id of the node to get highlight object for. 2817 | + DOM.NodeId nodeId 2818 | + returns 2819 | + # Highlight data for the node. 2820 | + object highlight 2821 | + # Hides any highlight. 2822 | + command hideHighlight 2823 | + # Highlights owner element of the frame with given id. 2824 | + command highlightFrame 2825 | + parameters 2826 | + # Identifier of the frame to highlight. 2827 | + Page.FrameId frameId 2828 | + # The content box highlight fill color (default: transparent). 2829 | + optional DOM.RGBA contentColor 2830 | + # The content box highlight outline color (default: transparent). 2831 | + optional DOM.RGBA contentOutlineColor 2832 | + # Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or 2833 | + # objectId must be specified. 2834 | + command highlightNode 2835 | + parameters 2836 | + # A descriptor for the highlight appearance. 2837 | + HighlightConfig highlightConfig 2838 | + # Identifier of the node to highlight. 2839 | + optional DOM.NodeId nodeId 2840 | + # Identifier of the backend node to highlight. 2841 | + optional DOM.BackendNodeId backendNodeId 2842 | + # JavaScript object id of the node to be highlighted. 2843 | + optional Runtime.RemoteObjectId objectId 2844 | + # Selectors to highlight relevant nodes. 2845 | + optional string selector 2846 | + # Highlights given quad. Coordinates are absolute with respect to the main frame viewport. 2847 | + command highlightQuad 2848 | + parameters 2849 | + # Quad to highlight 2850 | + DOM.Quad quad 2851 | + # The highlight fill color (default: transparent). 2852 | + optional DOM.RGBA color 2853 | + # The highlight outline color (default: transparent). 2854 | + optional DOM.RGBA outlineColor 2855 | + # Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. 2856 | + command highlightRect 2857 | + parameters 2858 | + # X coordinate 2859 | + integer x 2860 | + # Y coordinate 2861 | + integer y 2862 | + # Rectangle width 2863 | + integer width 2864 | + # Rectangle height 2865 | + integer height 2866 | + # The highlight fill color (default: transparent). 2867 | + optional DOM.RGBA color 2868 | + # The highlight outline color (default: transparent). 2869 | + optional DOM.RGBA outlineColor 2870 | + # Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. 2871 | + # Backend then generates 'inspectNodeRequested' event upon element selection. 2872 | + command setInspectMode 2873 | + parameters 2874 | + # Set an inspection mode. 2875 | + InspectMode mode 2876 | + # A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled 2877 | + # == false`. 2878 | + optional HighlightConfig highlightConfig 2879 | + # Highlights owner element of all frames detected to be ads. 2880 | + command setShowAdHighlights 2881 | + parameters 2882 | + # True for showing ad highlights 2883 | + boolean show 2884 | + command setPausedInDebuggerMessage 2885 | + parameters 2886 | + # The message to display, also triggers resume and step over controls. 2887 | + optional string message 2888 | + # Requests that backend shows debug borders on layers 2889 | + command setShowDebugBorders 2890 | + parameters 2891 | + # True for showing debug borders 2892 | + boolean show 2893 | + # Requests that backend shows the FPS counter 2894 | + command setShowFPSCounter 2895 | + parameters 2896 | + # True for showing the FPS counter 2897 | + boolean show 2898 | + # Requests that backend shows paint rectangles 2899 | + command setShowPaintRects 2900 | + parameters 2901 | + # True for showing paint rectangles 2902 | + boolean result 2903 | + # Requests that backend shows scroll bottleneck rects 2904 | + command setShowScrollBottleneckRects 2905 | + parameters 2906 | + # True for showing scroll bottleneck rects 2907 | + boolean show 2908 | + # Requests that backend shows hit-test borders on layers 2909 | + command setShowHitTestBorders 2910 | + parameters 2911 | + # True for showing hit-test borders 2912 | + boolean show 2913 | + # Paints viewport size upon main frame resize. 2914 | + command setShowViewportSizeOnResize 2915 | + parameters 2916 | + # Whether to paint size or not. 2917 | + boolean show 2918 | + command setSuspended 2919 | + parameters 2920 | + # Whether overlay should be suspended and not consume any resources until resumed. 2921 | + boolean suspended 2922 | + # Fired when the node should be inspected. This happens after call to `setInspectMode` or when 2923 | + # user manually inspects an element. 2924 | + event inspectNodeRequested 2925 | + parameters 2926 | + # Id of the node to inspect. 2927 | + DOM.BackendNodeId backendNodeId 2928 | + # Fired when the node should be highlighted. This happens after call to `setInspectMode`. 2929 | + event nodeHighlightRequested 2930 | + parameters 2931 | + DOM.NodeId nodeId 2932 | + # Fired when user asks to capture screenshot of some area on the page. 2933 | + event screenshotRequested 2934 | + parameters 2935 | + # Viewport to capture, in device independent pixels (dip). 2936 | + Page.Viewport viewport 2937 | + # Fired when user cancels the inspect mode. 2938 | + event inspectModeCanceled 2939 | + 2940 | +# Provides access to log entries. 2941 | +domain Log 2942 | + depends on Runtime 2943 | + depends on Network 2944 | + # Log entry. 2945 | + type LogEntry extends object 2946 | + properties 2947 | + # Log entry source. 2948 | + enum source 2949 | + xml 2950 | + javascript 2951 | + network 2952 | + storage 2953 | + appcache 2954 | + rendering 2955 | + security 2956 | + deprecation 2957 | + worker 2958 | + violation 2959 | + intervention 2960 | + recommendation 2961 | + other 2962 | + # Log entry severity. 2963 | + enum level 2964 | + verbose 2965 | + info 2966 | + warning 2967 | + error 2968 | + # Logged text. 2969 | + string text 2970 | + # Timestamp when this entry was added. 2971 | + Runtime.Timestamp timestamp 2972 | + # URL of the resource if known. 2973 | + optional string url 2974 | + # Line number in the resource. 2975 | + optional integer lineNumber 2976 | + # JavaScript stack trace. 2977 | + optional Runtime.StackTrace stackTrace 2978 | + # Identifier of the network request associated with this entry. 2979 | + optional Network.RequestId networkRequestId 2980 | + # Identifier of the worker associated with this entry. 2981 | + optional string workerId 2982 | + # Call arguments. 2983 | + optional array of Runtime.RemoteObject args 2984 | + # Violation configuration setting. 2985 | + type ViolationSetting extends object 2986 | + properties 2987 | + # Violation type. 2988 | + enum name 2989 | + longTask 2990 | + longLayout 2991 | + blockedEvent 2992 | + blockedParser 2993 | + discouragedAPIUse 2994 | + handler 2995 | + recurringHandler 2996 | + # Time threshold to trigger upon. 2997 | + number threshold 2998 | + # Clears the log. 2999 | + command clear 3000 | + # Disables log domain, prevents further log entries from being reported to the client. 3001 | + command disable 3002 | + # Enables log domain, sends the entries collected so far to the client by means of the 3003 | + # `entryAdded` notification. 3004 | + command enable 3005 | + # start violation reporting. 3006 | + command startViolationsReport 3007 | + parameters 3008 | + # Configuration for violations. 3009 | + array of ViolationSetting config 3010 | + # Stop violation reporting. 3011 | + command stopViolationsReport 3012 | + # Issued when new message was logged. 3013 | + event entryAdded 3014 | + parameters 3015 | + # The entry. 3016 | + LogEntry entry 3017 | + 3018 | +# Security 3019 | +domain Security 3020 | + # An internal certificate ID value. 3021 | + type CertificateId extends integer 3022 | + # A description of mixed content (HTTP resources on HTTPS pages), as defined by 3023 | + # https://www.w3.org/TR/mixed-content/#categories 3024 | + type MixedContentType extends string 3025 | + enum 3026 | + blockable 3027 | + optionally-blockable 3028 | + none 3029 | + # The security level of a page or resource. 3030 | + type SecurityState extends string 3031 | + enum 3032 | + unknown 3033 | + neutral 3034 | + insecure 3035 | + secure 3036 | + info 3037 | + # An explanation of an factor contributing to the security state. 3038 | + type SecurityStateExplanation extends object 3039 | + properties 3040 | + # Security state representing the severity of the factor being explained. 3041 | + SecurityState securityState 3042 | + # Title describing the type of factor. 3043 | + string title 3044 | + # Short phrase describing the type of factor. 3045 | + string summary 3046 | + # Full text explanation of the factor. 3047 | + string description 3048 | + # The type of mixed content described by the explanation. 3049 | + MixedContentType mixedContentType 3050 | + # Page certificate. 3051 | + array of string certificate 3052 | + # Recommendations to fix any issues. 3053 | + optional array of string recommendations 3054 | + # Information about insecure content on the page. 3055 | + type InsecureContentStatus extends object 3056 | + properties 3057 | + # True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts. 3058 | + boolean ranMixedContent 3059 | + # True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images. 3060 | + boolean displayedMixedContent 3061 | + # True if the page was loaded over HTTPS and contained a form targeting an insecure url. 3062 | + boolean containedMixedForm 3063 | + # True if the page was loaded over HTTPS without certificate errors, and ran content such as 3064 | + # scripts that were loaded with certificate errors. 3065 | + boolean ranContentWithCertErrors 3066 | + # True if the page was loaded over HTTPS without certificate errors, and displayed content 3067 | + # such as images that were loaded with certificate errors. 3068 | + boolean displayedContentWithCertErrors 3069 | + # Security state representing a page that ran insecure content. 3070 | + SecurityState ranInsecureContentStyle 3071 | + # Security state representing a page that displayed insecure content. 3072 | + SecurityState displayedInsecureContentStyle 3073 | + # The action to take when a certificate error occurs. continue will continue processing the 3074 | + # request and cancel will cancel the request. 3075 | + type CertificateErrorAction extends string 3076 | + enum 3077 | + continue 3078 | + cancel 3079 | + # Disables tracking security state changes. 3080 | + command disable 3081 | + # Enables tracking security state changes. 3082 | + command enable 3083 | + # Enable/disable whether all certificate errors should be ignored. 3084 | + experimental command setIgnoreCertificateErrors 3085 | + parameters 3086 | + # If true, all certificate errors will be ignored. 3087 | + boolean ignore 3088 | + # Handles a certificate error that fired a certificateError event. 3089 | + deprecated command handleCertificateError 3090 | + parameters 3091 | + # The ID of the event. 3092 | + integer eventId 3093 | + # The action to take on the certificate error. 3094 | + CertificateErrorAction action 3095 | + # Enable/disable overriding certificate errors. If enabled, all certificate error events need to 3096 | + # be handled by the DevTools client and should be answered with `handleCertificateError` commands. 3097 | + deprecated command setOverrideCertificateErrors 3098 | + parameters 3099 | + # If true, certificate errors will be overridden. 3100 | + boolean override 3101 | + # There is a certificate error. If overriding certificate errors is enabled, then it should be 3102 | + # handled with the `handleCertificateError` command. Note: this event does not fire if the 3103 | + # certificate error has been allowed internally. Only one client per target should override 3104 | + # certificate errors at the same time. 3105 | + deprecated event certificateError 3106 | + parameters 3107 | + # The ID of the event. 3108 | + integer eventId 3109 | + # The type of the error. 3110 | + string errorType 3111 | + # The url that was requested. 3112 | + string requestURL 3113 | + # The security state of the page changed. 3114 | + event securityStateChanged 3115 | + parameters 3116 | + # Security state. 3117 | + SecurityState securityState 3118 | + # True if the page was loaded over cryptographic transport such as HTTPS. 3119 | + boolean schemeIsCryptographic 3120 | + # List of explanations for the security state. If the overall security state is `insecure` or 3121 | + # `warning`, at least one corresponding explanation should be included. 3122 | + array of SecurityStateExplanation explanations 3123 | + # Information about insecure content on the page. 3124 | + InsecureContentStatus insecureContentStatus 3125 | + # Overrides user-visible description of the state. 3126 | + optional string summary 3127 | \ No newline at end of file 3128 | diff --git a/patch.diff b/patch.diff 3129 | new file mode 100644 3130 | index 0000000000..e69de29bb2 3131 | diff --git a/src/V8NativeScriptExtension.cc b/src/V8NativeScriptExtension.cc 3132 | new file mode 100644 3133 | index 0000000000..01f503a51a 3134 | --- /dev/null 3135 | +++ b/src/V8NativeScriptExtension.cc 3136 | @@ -0,0 +1,146 @@ 3137 | +#include "V8NativeScriptExtension.h" 3138 | +#include "objects/objects-inl.h" 3139 | +#include "objects/contexts.h" 3140 | +#include "objects/keys.h" 3141 | +#include "api/api-inl.h" 3142 | +#include "common/checks.h" 3143 | +#include "common/globals.h" 3144 | +#include "handles/handles.h" 3145 | +#include "codegen/assembler.h" 3146 | +#include 3147 | + 3148 | +using namespace v8; 3149 | + 3150 | +template 3151 | +class unsafe_arr 3152 | +{ 3153 | +public: 3154 | + unsafe_arr() 3155 | + : m_capacity(16), m_size(0) 3156 | + { 3157 | + m_data = alloc_data(m_capacity); 3158 | + } 3159 | + 3160 | + void push_back(const T& e) 3161 | + { 3162 | + if (m_size == m_capacity) 3163 | + { 3164 | + resize(); 3165 | + } 3166 | + m_data[m_size++] = e; 3167 | + } 3168 | + 3169 | + T* data() const 3170 | + { 3171 | + return m_data; 3172 | + } 3173 | + 3174 | + size_t size() const 3175 | + { 3176 | + return m_size; 3177 | + } 3178 | + 3179 | + static void release_data(T *data) 3180 | + { 3181 | + free(data); 3182 | + } 3183 | + 3184 | +private: 3185 | + T* alloc_data(size_t size) 3186 | + { 3187 | + T *data = reinterpret_cast(malloc(size * sizeof(T))); 3188 | + return data; 3189 | + } 3190 | + 3191 | + void resize() 3192 | + { 3193 | + size_t capacity = 2 * m_capacity; 3194 | + T *data = alloc_data(capacity); 3195 | + size_t size = m_size * sizeof(T); 3196 | + memcpy(data, m_data, size); 3197 | + release_data(m_data); 3198 | + m_data = data; 3199 | + m_capacity = capacity; 3200 | + } 3201 | + 3202 | + size_t m_capacity; 3203 | + size_t m_size; 3204 | + T *m_data; 3205 | +}; 3206 | + 3207 | + 3208 | +NativeScriptExtension::NativeScriptExtension() 3209 | +{ 3210 | +} 3211 | + 3212 | + 3213 | +unsigned long NativeScriptExtension::GetAddress(const Local& obj) 3214 | +{ 3215 | + i::Handle h = Utils::OpenHandle(*obj); 3216 | + 3217 | + return h->address(); 3218 | +} 3219 | + 3220 | + 3221 | +void NativeScriptExtension::ReleaseClosureObjects(Local* closureObjects) 3222 | +{ 3223 | + unsafe_arr>::release_data(closureObjects); 3224 | +} 3225 | + 3226 | + 3227 | +void NativeScriptExtension::GetAssessorPair(Isolate* isolate, const Local& obj, const Local& propName, Local& getter, Local& setter) 3228 | +{ 3229 | + i::Handle o = i::Handle::cast(Utils::OpenHandle(*obj)); 3230 | + 3231 | + i::Handle intname = Utils::OpenHandle(*propName); 3232 | + 3233 | + //Isolate* isolate = object->GetIsolate(); 3234 | + i::Isolate* internal_isolate = reinterpret_cast(isolate); 3235 | + 3236 | + internal::LookupIterator it(internal_isolate, o, intname, internal::LookupIterator::OWN); 3237 | + i::Handle maybe_pair = it.GetAccessors(); 3238 | + i::MaybeHandle native_context = it.GetHolder()->GetCreationContext(); 3239 | + 3240 | + if (!native_context.is_null()){ 3241 | + 3242 | + i::MaybeHandle g = internal::AccessorPair::GetComponent(internal_isolate, native_context.ToHandleChecked(), i::Handle::cast(maybe_pair), i::AccessorComponent::ACCESSOR_GETTER); 3243 | + if (!g.is_null()) 3244 | + { 3245 | + getter = Utils::ToLocal(g.ToHandleChecked()); 3246 | + } 3247 | + 3248 | + i::MaybeHandle s = internal::AccessorPair::GetComponent(internal_isolate, native_context.ToHandleChecked(), i::Handle::cast(maybe_pair), i::AccessorComponent::ACCESSOR_SETTER); 3249 | + if (!s.is_null()) 3250 | + { 3251 | + setter = Utils::ToLocal(s.ToHandleChecked()); 3252 | + } 3253 | + } 3254 | +} 3255 | + 3256 | + 3257 | +std::vector> NativeScriptExtension::GetPropertyKeys(Isolate* isolate, const Local& object) 3258 | +{ 3259 | + i::Handle obj = i::Handle::cast(Utils::OpenHandle(*object)); 3260 | + i::Isolate* internal_isolate = reinterpret_cast(isolate); 3261 | + 3262 | + i::Handle arr = i::KeyAccumulator::GetOwnEnumPropertyKeys(internal_isolate, obj); 3263 | + 3264 | + int len = arr->length(); 3265 | + 3266 | + std::vector> keys(len); 3267 | + for (int i = 0; i < len; i++) 3268 | + { 3269 | + i::Handle elem = i::Handle(arr->get(i), obj->GetIsolate()); 3270 | + Local val = Utils::ToLocal(elem); 3271 | + if (!val.IsEmpty()) 3272 | + { 3273 | + keys.push_back(val); 3274 | + } 3275 | + } 3276 | + 3277 | + return keys; 3278 | +} 3279 | + 3280 | +void NativeScriptExtension::CpuFeaturesProbe(bool cross_compile) { 3281 | + i::CpuFeatures::Probe(cross_compile); 3282 | +} 3283 | \ No newline at end of file 3284 | diff --git a/src/V8NativeScriptExtension.h b/src/V8NativeScriptExtension.h 3285 | new file mode 100644 3286 | index 0000000000..9c79c44060 3287 | --- /dev/null 3288 | +++ b/src/V8NativeScriptExtension.h 3289 | @@ -0,0 +1,21 @@ 3290 | +#include 3291 | +#include "init/v8.h" 3292 | +#include "api/api.h" 3293 | + 3294 | +namespace v8 { 3295 | + 3296 | + class NativeScriptExtension { 3297 | + public: 3298 | + static unsigned long GetAddress(const v8::Local& obj); 3299 | + 3300 | + static void ReleaseClosureObjects(v8::Local* closureObjects); 3301 | + 3302 | + static void GetAssessorPair(v8::Isolate* isolate, const v8::Local& obj, const v8::Local& propName, v8::Local& getter, v8::Local& setter); 3303 | + 3304 | + static std::vector> GetPropertyKeys(v8::Isolate* isolate, const v8::Local& object); 3305 | + 3306 | + static void CpuFeaturesProbe(bool cross_compile); 3307 | + private: 3308 | + NativeScriptExtension(); 3309 | + }; 3310 | +} 3311 | \ No newline at end of file 3312 | diff --git a/src/inspector/inspector_protocol_config.json b/src/inspector/inspector_protocol_config.json 3313 | index bd4f9c534c..2a529d406a 100644 3314 | --- a/src/inspector/inspector_protocol_config.json 3315 | +++ b/src/inspector/inspector_protocol_config.json 3316 | @@ -27,7 +27,35 @@ 3317 | { 3318 | "domain": "HeapProfiler", 3319 | "async": ["collectGarbage"] 3320 | - } 3321 | + }, 3322 | + { 3323 | + "domain": "Page", 3324 | + "exclude": ["getNavigationHistory", "navigateToHistoryEntry", "resetNavigationHistory", "captureScreenshot", "screencastFrameAck", "handleJavaScriptDialog", "setColorPickerEnabled", "getAppManifest", "setControlNavigations", "processNavigation", "printToPDF", "bringToFront", "setDownloadBehavior", "navigate", "crash", "close", "setWebLifecycleState", "captureSnapshot"], 3325 | + "async": ["getResourceContent", "searchInResource"], 3326 | + "exclude_events": ["screencastFrame", "screencastVisibilityChanged", "colorPicked", "interstitialShown", "interstitialHidden", "javascriptDialogOpening", "javascriptDialogClosed", "navigationRequested"] 3327 | + }, 3328 | + { 3329 | + "domain": "Network", 3330 | + "exclude": ["clearBrowserCache", "clearBrowserCookies", "getCookies", "getAllCookies", "deleteCookies", "setCookie", "setCookies", "canEmulateNetworkConditions", "setRequestInterception", "continueInterceptedRequest", "getResponseBodyForInterception", "takeResponseBodyForInterceptionAsStream"], 3331 | + "async": ["getResponseBody", "getRequestPostData"] 3332 | + }, 3333 | + { 3334 | + "domain": "DOM" 3335 | + }, 3336 | + { 3337 | + "domain": "CSS", 3338 | + "async": ["enable"] 3339 | + }, 3340 | + { 3341 | + "domain": "Overlay" 3342 | + }, 3343 | + { 3344 | + "domain": "Log" 3345 | + }, 3346 | + { 3347 | + "domain": "Security", 3348 | + "include": [] 3349 | + } 3350 | ] 3351 | }, 3352 | 3353 | -------------------------------------------------------------------------------- /patches/prebuild_no_snapd.patch: -------------------------------------------------------------------------------- 1 | diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh 2 | index 7f07bcbf0..657f138af 100755 3 | --- a/build/install-build-deps.sh 4 | +++ b/build/install-build-deps.sh 5 | @@ -570,9 +570,9 @@ fi 6 | if package_exists libinput-dev; then 7 | dev_list="${dev_list} libinput-dev" 8 | fi 9 | -if package_exists snapcraft; then 10 | - dev_list="${dev_list} snapcraft" 11 | -fi 12 | +# if package_exists snapcraft; then 13 | +# dev_list="${dev_list} snapcraft" 14 | +# fi 15 | 16 | # Cross-toolchain strip is needed for building the sysroots. 17 | if package_exists binutils-arm-linux-gnueabihf; then 18 | -------------------------------------------------------------------------------- /scripts/apply_patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | pushd v8 4 | pushd build 5 | git apply --cached ../../patches/android/build.patch 6 | git checkout -- . 7 | popd 8 | git apply --cached ../patches/android/main.patch 9 | git checkout -- . 10 | popd 11 | -------------------------------------------------------------------------------- /scripts/build.android.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | source $(dirname $0)/env.sh 4 | 5 | ARCH_ARR=(arm arm64 x86 x64) 6 | while getopts 'l:' opt; do 7 | case ${opt} in 8 | l) 9 | ARCH_ARR=($OPTARG) 10 | ;; 11 | esac 12 | done 13 | shift $(expr ${OPTIND} - 1) 14 | ## prepare configuration 15 | 16 | 17 | if [ "$(uname)" == "Darwin" ]; then 18 | NDK_BUILD_TOOLS_ARR=([arm]=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/bin \ 19 | [arm64]=$ANDROID_NDK/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/aarch64-linux-android/bin \ 20 | [x86]=$ANDROID_NDK/toolchains/x86-4.9/prebuilt/darwin-x86_64/i686-linux-android/bin \ 21 | [x64]=$ANDROID_NDK/toolchains/x86_64-4.9/prebuilt/darwin-x86_64/x86_64-linux-android/bin) 22 | else 23 | NDK_BUILD_TOOLS_ARR=([arm]=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin \ 24 | [arm64]=$ANDROID_NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/aarch64-linux-android/bin \ 25 | [x86]=$ANDROID_NDK/toolchains/x86-4.9/prebuilt/linux-x86_64/i686-linux-android/bin \ 26 | [x64]=$ANDROID_NDK/toolchains/x86_64-4.9/prebuilt/linux-x86_64/x86_64-linux-android/bin) 27 | fi 28 | 29 | # The order of CPU architectures in this array must be the same 30 | # as the order of NDK tools in the NDK_BUILD_TOOLS_ARR array 31 | 32 | BUILD_DIR_PREFIX="outgn" 33 | 34 | BUILD_TYPE="release" 35 | 36 | cd ${V8_DIR} 37 | if [[ $1 == "debug" ]] ;then 38 | BUILD_TYPE="debug" 39 | fi 40 | # generate project in release mode 41 | for CURRENT_ARCH in ${ARCH_ARR[@]} 42 | do 43 | if [[ $BUILD_TYPE == "debug" ]] ;then 44 | gn gen $BUILD_DIR_PREFIX/$CURRENT_ARCH-$BUILD_TYPE --args="is_component_build=true v8_use_external_startup_data=true is_debug=true symbol_level=2 target_cpu=\"$CURRENT_ARCH\" v8_target_cpu=\"$CURRENT_ARCH\" v8_enable_i18n_support=false target_os=\"android\" v8_android_log_stdout=false" 45 | else 46 | ARGS="use_goma=false is_clang=true enable_resource_allowlist_generation=false is_component_build=true v8_use_external_startup_data=false is_official_build=true use_thin_lto=false is_debug=false symbol_level=0 target_cpu=\"$CURRENT_ARCH\" v8_target_cpu=\"$CURRENT_ARCH\" v8_enable_i18n_support=false target_os=\"android\" v8_android_log_stdout=false use_custom_libcxx=true cc_wrapper=\"ccache\"" 47 | gn gen $BUILD_DIR_PREFIX/$CURRENT_ARCH-$BUILD_TYPE --args="$ARGS android32_ndk_api_level=$NDK_API_LEVEL android_ndk_major_version=$NDK_MAJOR_VERSION android_sdk_platform_version=$ANDROID_SDK_PLATFORM_VERSION android_sdk_build_tools_version=\"$ANDROID_SDK_BUILD_TOOLS_VERSION\" android_sdk_version=$ANDROID_SDK_PLATFORM_VERSION android64_ndk_api_level=$NDK_64_API_LEVEL" 48 | 49 | fi 50 | done 51 | 52 | # compile project 53 | for CURRENT_ARCH in ${ARCH_ARR[@]} 54 | do 55 | 56 | # make fat build 57 | V8_FOLDERS=(v8_compiler v8_base_without_compiler v8_libplatform v8_snapshot v8_libbase v8_bigint torque_generated_initializers torque_generated_definitions) 58 | export CCACHE_CPP2=yes 59 | export CCACHE_SLOPPINESS=time_macros 60 | export PATH=$V8_DIR/third_party/llvm-build/Release+Asserts/bin:$PATH 61 | SECONDS=0 62 | ninja -C $BUILD_DIR_PREFIX/$CURRENT_ARCH-$BUILD_TYPE ${V8_FOLDERS[@]} inspector 63 | 64 | echo "build finished in $SECONDS seconds" 65 | 66 | 67 | OUTFOLDER=${BUILD_DIR_PREFIX}/${CURRENT_ARCH}-${BUILD_TYPE} 68 | CURRENT_BUILD_TOOL=${NDK_BUILD_TOOLS_ARR[$CURRENT_ARCH]} 69 | V8_FOLDERS_LEN=${#V8_FOLDERS[@]} 70 | LAST_PARAM="" 71 | CURRENT_DIST_DIR="$DIST_DIR/$CURRENT_ARCH-$BUILD_TYPE" 72 | echo "CURRENT_ARCH $CURRENT_ARCH" 73 | echo "CURRENT_BUILD_TOOL $CURRENT_BUILD_TOOL" 74 | 75 | mkdir -p $CURRENT_DIST_DIR 76 | 77 | for CURRENT_V8_FOLDER in ${V8_FOLDERS[@]} 78 | do 79 | LAST_PARAM="${LAST_PARAM} ${OUTFOLDER}/obj/${CURRENT_V8_FOLDER}/*.o" 80 | done 81 | 82 | $CURRENT_BUILD_TOOL/ar r $CURRENT_DIST_DIR/libinspector_protocol.a $OUTFOLDER/obj/third_party/inspector_protocol/crdtp/*.o $OUTFOLDER/obj/third_party/inspector_protocol/crdtp_platform/*.o 83 | $CURRENT_BUILD_TOOL/ranlib $CURRENT_DIST_DIR/libinspector_protocol.a 84 | 85 | LAST_PARAM="${LAST_PARAM} $OUTFOLDER/obj/third_party/zlib/zlib/*.o ${OUTFOLDER}/obj/third_party/zlib/zlib/*.o ${OUTFOLDER}/obj/third_party/zlib/zlib_adler32_simd/*.o ${OUTFOLDER}/obj/third_party/zlib/google/compression_utils_portable/*.o ${OUTFOLDER}/obj/third_party/zlib/zlib_inflate_chunk_simd/*.o" 86 | 87 | LAST_PARAM="${LAST_PARAM} ${OUTFOLDER}/obj/third_party/android_ndk/cpu_features/*.o" 88 | LAST_PARAM="${LAST_PARAM} ${OUTFOLDER}/obj/cppgc_base/*.o ${OUTFOLDER}/obj/v8_cppgc_shared/*.o" 89 | 90 | if [[ $CURRENT_ARCH = "arm" || $CURRENT_ARCH = "arm64" ]]; then 91 | LAST_PARAM="${LAST_PARAM} ${OUTFOLDER}/obj/third_party/zlib/zlib_arm_crc32/*.o" 92 | fi 93 | 94 | if [[ $CURRENT_ARCH = "x86" || $CURRENT_ARCH = "x64" ]]; then 95 | LAST_PARAM="${LAST_PARAM} ${OUTFOLDER}/obj/third_party/zlib/zlib_x86_simd/*.o ${OUTFOLDER}/obj/third_party/zlib/zlib_crc32_simd/*.o" 96 | fi 97 | 98 | THIRD_PARTY_OUT=$BUILD_DIR_PREFIX/$CURRENT_ARCH-$BUILD_TYPE/obj/buildtools/third_party 99 | LAST_PARAM="${LAST_PARAM} $THIRD_PARTY_OUT/libc++/libc++/*.o $THIRD_PARTY_OUT/libc++abi/libc++abi/*.o" 100 | 101 | $CURRENT_BUILD_TOOL/ar r $CURRENT_DIST_DIR/libv8.a ${LAST_PARAM} 102 | 103 | # include files 104 | rsync -r --exclude '.git' --exclude '.cache' --exclude 'DEPS' --exclude 'DIR_METADATA' "$V8_DIR/include/" "$CURRENT_DIST_DIR/include/" 105 | rsync -r --exclude '.git' --exclude '.git' "${OUTFOLDER}/gen/include/" "$CURRENT_DIST_DIR/include/" 106 | rsync -r --exclude '.git' --exclude '.git' "$V8_DIR/third_party/android_ndk/sources/cxx-stl/llvm-libc++/include/" "$CURRENT_DIST_DIR/include/libc++/" 107 | 108 | # generated files 109 | rsync -r --exclude '.git' --exclude '*.cache' --exclude 'snapshot.cc' --exclude 'embedded.S' "${OUTFOLDER}/gen/" "$CURRENT_DIST_DIR/generated/" 110 | 111 | mkdir -p "$CURRENT_DIST_DIR/v8_inspector" 112 | INSPECTOR_LIST=($(grep "\"+.*\"" $V8_DIR/src/inspector/DEPS | sed 's/[+,"]//g')) 113 | # remove last one ../../third_party/inspector_protocol/crdtp 114 | unset INSPECTOR_LIST[-1] 115 | INSPECTOR_LIST+=("base/trace_event") 116 | INSPECTOR_LIST+=("src/base") 117 | INSPECTOR_LIST+=("src/common") 118 | rsync -auR --exclude '.git' --exclude '*.cache' --exclude 'DEPS' --exclude 'DIR_METADATA' --exclude 'OWNERS' --exclude 'BUILD.gn' "${INSPECTOR_LIST[@]}" "$CURRENT_DIST_DIR/v8_inspector/" 119 | rsync -ur --exclude '.git' --exclude '*.cache' --exclude 'DEPS' --exclude 'DIR_METADATA' --exclude 'OWNERS' --exclude 'BUILD.gn' "$CURRENT_DIST_DIR/generated/src/" "$CURRENT_DIST_DIR/v8_inspector/src/" 120 | done 121 | -------------------------------------------------------------------------------- /scripts/build.ios.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | CATALYST=0 4 | DIST_SUFFIX="" 5 | while getopts 'c' opt; do 6 | case ${opt} in 7 | c) 8 | CATALYST="1" 9 | DIST_SUFFIX="-catalyst" 10 | ;; 11 | esac 12 | done 13 | shift $(expr ${OPTIND} - 1) 14 | 15 | source $(dirname $0)/env.sh 16 | cd ${V8_DIR} 17 | 18 | if [[ ${CATALYST} = "1" ]]; then 19 | ARCH_ARR=(x64 arm64) 20 | else 21 | ARCH_ARR=(x64-simulator arm64-simulator arm64-device) 22 | fi 23 | 24 | MODULES=(v8_base v8_base_without_compiler v8_compiler v8_libplatform) 25 | 26 | for CURRENT_ARCH in ${ARCH_ARR[@]} 27 | do 28 | OUTFOLDER=out.gn/${CURRENT_ARCH}${DIST_SUFFIX}-release 29 | if [[ ${CATALYST} = "1" ]]; then 30 | TARGET_ENV="catalyst" 31 | else 32 | ARCH_PARTS=(${CURRENT_ARCH//-/ }) 33 | TARGET_ENV=${ARCH_PARTS[1]} 34 | fi 35 | echo "Building for $OUTFOLDER ($TARGET_ENV)" 36 | ARCH=${ARCH_PARTS[0]} 37 | gn gen $OUTFOLDER --args="v8_enable_webassembly=false treat_warnings_as_errors=false v8_enable_pointer_compression=false is_official_build=true use_custom_libcxx=false is_component_build=false symbol_level=0 v8_enable_v8_checks=false v8_enable_debugging_features=false is_debug=false v8_use_external_startup_data=false use_xcode_clang=true enable_ios_bitcode=true ios_enable_code_signing=false v8_enable_i18n_support=false target_environment=\"$TARGET_ENV\" target_cpu=\"$ARCH\" v8_target_cpu=\"$ARCH\" target_os=\"ios\" ios_deployment_target=\"$IOS_DEPLOYMENT_TARGET\"" 38 | ninja -C $OUTFOLDER ${MODULES[@]} inspector 39 | 40 | for MODULE in ${MODULES[@]} 41 | do 42 | ar r $OUTFOLDER/obj/$MODULE/lib$MODULE.a $OUTFOLDER/obj/$MODULE/*.o 43 | done 44 | 45 | # Those libraries are needed if we set v8_enable_i18n_support=true 46 | # See https://groups.google.com/forum/#!topic/v8-users/T3Cye9FHRQk for embedding the icudtl.dat into the application 47 | # OBJECTS="$OBJECTS $OUTFOLDER/obj/third_party/icu/icuuc/*.o" 48 | # OBJECTS="$OBJECTS $OUTFOLDER/obj/third_party/icu/icui18n/*.o" 49 | # OBJECTS="$OBJECTS $OUTFOLDER/obj/v8_crash_keys/*.o" 50 | 51 | # ar r $OUTFOLDER/libv8.a $OBJECTS 52 | done 53 | 54 | mkdir -p $DIST_DIR 55 | for MODULE in ${MODULES[@]} 56 | do 57 | for CURRENT_ARCH in ${ARCH_ARR[@]} 58 | do 59 | mkdir -p "$DIST_DIR/${CURRENT_ARCH}${DIST_SUFFIX}" 60 | OUTFOLDER=out.gn/${CURRENT_ARCH}${DIST_SUFFIX}-release 61 | cp "$OUTFOLDER/obj/$MODULE/lib$MODULE.a" "$DIST_DIR/${CURRENT_ARCH}${DIST_SUFFIX}" 62 | done 63 | done 64 | 65 | for CURRENT_ARCH in ${ARCH_ARR[@]} 66 | do 67 | mkdir -p "$DIST_DIR/${CURRENT_ARCH}${DIST_SUFFIX}" 68 | OUTFOLDER=out.gn/${CURRENT_ARCH}${DIST_SUFFIX}-release 69 | ar r $OUTFOLDER/obj/third_party/inspector_protocol/libinspector_protocol.a $OUTFOLDER/obj/third_party/inspector_protocol/crdtp/*.o $OUTFOLDER/obj/third_party/inspector_protocol/crdtp_platform/*.o 70 | cp "$OUTFOLDER/obj/third_party/inspector_protocol/libinspector_protocol.a" "$DIST_DIR/${CURRENT_ARCH}${DIST_SUFFIX}" 71 | 72 | ZLIB_INPUT="$OUTFOLDER/obj/third_party/zlib/zlib/*.o" 73 | ARCH_PARTS=(${CURRENT_ARCH//-/ }) 74 | ARCH=${ARCH_PARTS[0]} 75 | if [ $ARCH = "arm64" ]; then 76 | if [[ ${CATALYST} = "1" ]]; then 77 | ZLIB_INPUT="$ZLIB_INPUT $OUTFOLDER/obj/third_party/zlib/zlib_adler32_simd/*.o" 78 | ZLIB_INPUT="$ZLIB_INPUT $OUTFOLDER/obj/third_party/zlib/zlib_inflate_chunk_simd/*.o" 79 | else 80 | ZLIB_INPUT="$ZLIB_INPUT $OUTFOLDER/obj/third_party/zlib/zlib_adler32_simd/*.o" 81 | ZLIB_INPUT="$ZLIB_INPUT $OUTFOLDER/obj/third_party/zlib/zlib_inflate_chunk_simd/*.o" 82 | fi 83 | fi 84 | 85 | ZLIB_INPUT="$ZLIB_INPUT $OUTFOLDER/obj/third_party/zlib/google/compression_utils_portable/*.o" 86 | 87 | ar r $OUTFOLDER/obj/third_party/zlib/libzip.a $ZLIB_INPUT 88 | cp "$OUTFOLDER/obj/third_party/zlib/libzip.a" "$DIST_DIR/${CURRENT_ARCH}${DIST_SUFFIX}" 89 | 90 | ar r $OUTFOLDER/obj/cppgc_base/libcppgc_base.a $OUTFOLDER/obj/cppgc_base/*.o 91 | cp "$OUTFOLDER/obj/cppgc_base/libcppgc_base.a" "$DIST_DIR/${CURRENT_ARCH}${DIST_SUFFIX}" 92 | 93 | ar r $OUTFOLDER/obj/v8_cppgc_shared/libv8_cppgc_shared.a $OUTFOLDER/obj/v8_cppgc_shared/*.o 94 | cp "$OUTFOLDER/obj/v8_cppgc_shared/libv8_cppgc_shared.a" "$DIST_DIR/${CURRENT_ARCH}${DIST_SUFFIX}" 95 | done -------------------------------------------------------------------------------- /scripts/env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | CURR_DIR=$(dirname $(realpath $0)) 4 | ROOT_DIR=$(dirname ${CURR_DIR}) 5 | unset CURR_DIR 6 | 7 | DEPOT_TOOLS_DIR="${ROOT_DIR}/scripts/depot_tools" 8 | V8_DIR="${ROOT_DIR}/v8" 9 | DIST_DIR="${ROOT_DIR}/dist" 10 | PATCHES_DIR="${ROOT_DIR}/patches" 11 | 12 | V8_VERSION="9.7.106.13" 13 | NDK_VERSION="r22b" 14 | NDK_MAJOR_VERSION=$(echo $NDK_VERSION | sed 's/[a-zA-Z]//g') 15 | NDK_API_LEVEL="17" 16 | NDK_64_API_LEVEL="21" 17 | IOS_DEPLOYMENT_TARGET="9" 18 | ANDROID_SDK_PLATFORM_VERSION="30" 19 | ANDROID_SDK_BUILD_TOOLS_VERSION="30.0.2" 20 | ANDROID_NDK="${V8_DIR}/android-ndk-${NDK_VERSION}" 21 | 22 | export PATH="$DEPOT_TOOLS_DIR:$PATH" 23 | -------------------------------------------------------------------------------- /scripts/setup-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | GCLIENT_SYNC_ARGS="--reset --with_branch_head" 4 | while getopts 'r:s' opt; do 5 | case ${opt} in 6 | r) 7 | GCLIENT_SYNC_ARGS+=" --revision ${OPTARG}" 8 | ;; 9 | s) 10 | GCLIENT_SYNC_ARGS+=" --no-history" 11 | ;; 12 | esac 13 | done 14 | shift $(expr ${OPTIND} - 1) 15 | 16 | source $(dirname $0)/env.sh 17 | GCLIENT_SYNC_ARGS+=" --revision $V8_VERSION" 18 | 19 | function verify_platform() 20 | { 21 | local arg=$1 22 | SUPPORTED_PLATFORMS=(android ios) 23 | local valid_platform= 24 | for platform in ${SUPPORTED_PLATFORMS[@]} 25 | do 26 | if [[ ${arg} = ${platform} ]]; then 27 | valid_platform=${platform} 28 | fi 29 | done 30 | if [[ -z ${valid_platform} ]]; then 31 | echo "Invalid platfrom: ${arg}" >&2 32 | exit 1 33 | fi 34 | echo ${valid_platform} 35 | } 36 | 37 | # Install NDK 38 | function installNDK() { 39 | pushd . 40 | cd "${V8_DIR}" 41 | wget -q https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-linux-x86_64.zip 42 | unzip -q android-ndk-${NDK_VERSION}-linux-x86_64.zip 43 | rm -f android-ndk-${NDK_VERSION}-linux-x86_64.zip 44 | popd 45 | ls -d ${V8_DIR} 46 | } 47 | 48 | if [[ ! -d "${DEPOT_TOOLS_DIR}" || ! -f "${DEPOT_TOOLS_DIR}/gclient" ]]; then 49 | git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git "${DEPOT_TOOLS_DIR}" 50 | fi 51 | 52 | gclient config --name v8 --unmanaged "https://chromium.googlesource.com/v8/v8.git" 53 | 54 | if [[ "$1" = "" ]]; then 55 | gclient sync ${GCLIENT_SYNC_ARGS} 56 | exit 0 57 | fi 58 | PLATFORM=$(verify_platform $1) 59 | 60 | if [[ ${PLATFORM} = "ios" ]]; then 61 | gclient sync --deps=ios ${GCLIENT_SYNC_ARGS} 62 | 63 | cd "${V8_DIR}/tools/clang/dsymutil" 64 | curl -O http://commondatastorage.googleapis.com/chromium-browser-clang-staging/Mac/dsymutil-354873-1.tgz 65 | tar -zxvf dsymutil-354873-1.tgz 66 | # Apply N Patches 67 | patch -d "${V8_DIR}" -p1 < "${PATCHES_DIR}/ios/main.patch" 68 | exit 0 69 | fi 70 | 71 | if [[ ${PLATFORM} = "android" ]]; then 72 | gclient sync --deps=android ${GCLIENT_SYNC_ARGS} 73 | 74 | # Patch build-deps installer for snapd not available in docker 75 | patch -d "${V8_DIR}" -p1 < "${PATCHES_DIR}/prebuild_no_snapd.patch" 76 | 77 | sudo bash -c 'v8/build/install-build-deps-android.sh' 78 | 79 | # Reset changes after installation 80 | patch -d "${V8_DIR}" -p1 -R < "${PATCHES_DIR}/prebuild_no_snapd.patch" 81 | 82 | # Workaround to install missing sysroot 83 | gclient sync 84 | 85 | # Workaround to install missing android_sdk tools 86 | gclient sync --deps=android ${GCLIENT_SYNC_ARGS} 87 | 88 | # Apply N Patches 89 | patch -d "${V8_DIR}" -p1 < "${PATCHES_DIR}/android/main.patch" 90 | # patch -d "${V8_DIR}" -p1 < "${PATCHES_DIR}/android/main.patch" 91 | 92 | installNDK 93 | exit 0 94 | fi 95 | --------------------------------------------------------------------------------