return v8::Null(isolate());
}
+int32_t WebContents::ID() const {
+ return weak_map_id();
+}
+
v8::Local<v8::Value> WebContents::Session(v8::Isolate* isolate) {
return v8::Local<v8::Value>::New(isolate, session_);
}
.SetMethod("_printToPDF", &WebContents::PrintToPDF)
.SetMethod("addWorkSpace", &WebContents::AddWorkSpace)
.SetMethod("removeWorkSpace", &WebContents::RemoveWorkSpace)
+ .SetProperty("id", &WebContents::ID)
.SetProperty("session", &WebContents::Session)
.SetProperty("hostWebContents", &WebContents::HostWebContents)
.SetProperty("devToolsWebContents", &WebContents::DevToolsWebContents)
v8::Local<v8::Value> GetOwnerBrowserWindow();
// Properties.
+ int32_t ID() const;
v8::Local<v8::Value> Session(v8::Isolate* isolate);
content::WebContents* HostWebContents();
v8::Local<v8::Value> DevToolsWebContents(v8::Isolate* isolate);
`WebContents` objects also have the following properties:
+### `webContents.id`
+
+The unique ID of this WebContents.
+
### `webContents.session`
Returns the [session](session.md) object used by this webContents.