mate::Dictionary dict(isolate, exports);
dict.SetMethod("create", &atom::api::WebContents::Create);
dict.SetMethod("_setWrapWebContents", &atom::api::SetWrapWebContents);
+ dict.SetMethod("fromId",
+ &mate::TrackableObject<atom::api::WebContents>::FromWeakMapID);
}
} // namespace
debuggerBinding._setWrapDebugger(wrapDebugger)
sessionBinding._setWrapSession(wrapSession)
-module.exports.create = function (options) {
- if (options == null) {
- options = {}
+module.exports = {
+ create (options = {}) {
+ return binding.create(options)
+ },
+
+ fromId (id) {
+ return binding.fromId(id)
}
- return binding.create(options)
}