events.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.Events = void 0;
  6. /**
  7. * Copyright 2019 Google Inc. All rights reserved.
  8. * Modifications copyright (c) Microsoft Corporation.
  9. *
  10. * Licensed under the Apache License, Version 2.0 (the "License");
  11. * you may not use this file except in compliance with the License.
  12. * You may obtain a copy of the License at
  13. *
  14. * http://www.apache.org/licenses/LICENSE-2.0
  15. *
  16. * Unless required by applicable law or agreed to in writing, software
  17. * distributed under the License is distributed on an "AS IS" BASIS,
  18. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. * See the License for the specific language governing permissions and
  20. * limitations under the License.
  21. */
  22. const Events = exports.Events = {
  23. AndroidDevice: {
  24. WebView: 'webview',
  25. Close: 'close'
  26. },
  27. AndroidSocket: {
  28. Data: 'data',
  29. Close: 'close'
  30. },
  31. AndroidWebView: {
  32. Close: 'close'
  33. },
  34. Browser: {
  35. Disconnected: 'disconnected'
  36. },
  37. BrowserContext: {
  38. Console: 'console',
  39. Close: 'close',
  40. Dialog: 'dialog',
  41. Page: 'page',
  42. // Can't use just 'error' due to node.js special treatment of error events.
  43. // @see https://nodejs.org/api/events.html#events_error_events
  44. WebError: 'weberror',
  45. BackgroundPage: 'backgroundpage',
  46. ServiceWorker: 'serviceworker',
  47. Request: 'request',
  48. Response: 'response',
  49. RequestFailed: 'requestfailed',
  50. RequestFinished: 'requestfinished'
  51. },
  52. BrowserServer: {
  53. Close: 'close'
  54. },
  55. Page: {
  56. Close: 'close',
  57. Crash: 'crash',
  58. Console: 'console',
  59. Dialog: 'dialog',
  60. Download: 'download',
  61. FileChooser: 'filechooser',
  62. DOMContentLoaded: 'domcontentloaded',
  63. // Can't use just 'error' due to node.js special treatment of error events.
  64. // @see https://nodejs.org/api/events.html#events_error_events
  65. PageError: 'pageerror',
  66. Request: 'request',
  67. Response: 'response',
  68. RequestFailed: 'requestfailed',
  69. RequestFinished: 'requestfinished',
  70. FrameAttached: 'frameattached',
  71. FrameDetached: 'framedetached',
  72. FrameNavigated: 'framenavigated',
  73. Load: 'load',
  74. Popup: 'popup',
  75. WebSocket: 'websocket',
  76. Worker: 'worker'
  77. },
  78. WebSocket: {
  79. Close: 'close',
  80. Error: 'socketerror',
  81. FrameReceived: 'framereceived',
  82. FrameSent: 'framesent'
  83. },
  84. Worker: {
  85. Close: 'close'
  86. },
  87. ElectronApplication: {
  88. Close: 'close',
  89. Window: 'window'
  90. }
  91. };