native-fn 1.0.63 → 1.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/README.md +2 -2
  2. package/dist/native.cjs +16 -14
  3. package/dist/native.min.cjs +1 -1
  4. package/dist/native.min.mjs +1 -1
  5. package/dist/native.mjs +16 -14
  6. package/dist/native.umd.js +16 -14
  7. package/dist/native.umd.min.js +1 -1
  8. package/dist/plugin/app/index.cjs +27 -20
  9. package/dist/plugin/app/index.d.ts +5 -0
  10. package/dist/plugin/app/index.min.cjs +1 -1
  11. package/dist/plugin/app/index.min.mjs +1 -1
  12. package/dist/plugin/app/index.mjs +27 -20
  13. package/dist/plugin/app/index.umd.js +27 -20
  14. package/dist/plugin/app/index.umd.min.js +1 -1
  15. package/dist/plugin/app/src/plugin/app/constants/index.d.ts +12 -0
  16. package/dist/plugin/app/src/plugin/app/cores/index.d.ts +3 -0
  17. package/dist/plugin/app/src/plugin/app/index.d.ts +1 -1
  18. package/dist/plugin/app/src/plugin/app/types/app.d.ts +6 -1
  19. package/dist/plugin/app/src/plugin/app/types/index.d.ts +2 -2
  20. package/dist/plugin/app/src/plugin/appearance/constants/index.d.ts +11 -0
  21. package/dist/plugin/app/src/plugin/appearance/cores/index.d.ts +3 -0
  22. package/dist/plugin/app/src/plugin/appearance/index.d.ts +8 -0
  23. package/dist/plugin/app/src/plugin/appearance/types/appearance.d.ts +6 -0
  24. package/dist/plugin/app/src/plugin/appearance/types/index.d.ts +13 -0
  25. package/dist/plugin/app/src/plugin/camera/constants/inedx.d.ts +4 -0
  26. package/dist/plugin/app/src/plugin/camera/cores/index.d.ts +3 -0
  27. package/dist/plugin/app/src/plugin/camera/index.d.ts +1 -1
  28. package/dist/plugin/app/src/plugin/camera/types/camera.d.ts +1 -1
  29. package/dist/plugin/app/src/plugin/camera/types/index.d.ts +1 -1
  30. package/dist/plugin/app/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  31. package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +3 -0
  32. package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +35 -0
  33. package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  34. package/dist/plugin/app/src/plugin/theme/constants/index.d.ts +14 -0
  35. package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +3 -0
  36. package/dist/plugin/app/src/plugin/theme/index.d.ts +1 -1
  37. package/dist/plugin/app/src/plugin/theme/types/index.d.ts +1 -1
  38. package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +1 -1
  39. package/dist/plugin/appearance/index.cjs +766 -0
  40. package/dist/plugin/appearance/index.d.ts +100 -0
  41. package/dist/plugin/appearance/index.min.cjs +1 -0
  42. package/dist/plugin/appearance/index.min.mjs +1 -0
  43. package/dist/plugin/appearance/index.mjs +764 -0
  44. package/dist/plugin/appearance/index.umd.js +772 -0
  45. package/dist/plugin/appearance/index.umd.min.js +1 -0
  46. package/dist/plugin/appearance/src/constants/platform.d.ts +67 -0
  47. package/dist/plugin/appearance/src/errors/plugin-not-extended-error.d.ts +2 -0
  48. package/dist/plugin/appearance/src/plugin/app/constants/index.d.ts +12 -0
  49. package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +3 -0
  50. package/dist/plugin/appearance/src/plugin/app/errors/url-open-error.d.ts +2 -0
  51. package/dist/plugin/appearance/src/plugin/app/index.d.ts +12 -0
  52. package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +54 -0
  53. package/dist/plugin/appearance/src/plugin/app/types/index.d.ts +16 -0
  54. package/dist/plugin/appearance/src/plugin/app/utils/try-open-url.d.ts +16 -0
  55. package/dist/plugin/appearance/src/plugin/appearance/constants/index.d.ts +11 -0
  56. package/dist/plugin/appearance/src/plugin/appearance/cores/index.d.ts +3 -0
  57. package/dist/plugin/appearance/src/plugin/appearance/index.d.ts +8 -0
  58. package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +6 -0
  59. package/dist/plugin/appearance/src/plugin/appearance/types/index.d.ts +13 -0
  60. package/dist/plugin/appearance/src/plugin/camera/constants/inedx.d.ts +4 -0
  61. package/dist/plugin/appearance/src/plugin/camera/cores/index.d.ts +3 -0
  62. package/dist/plugin/appearance/src/plugin/camera/index.d.ts +8 -0
  63. package/dist/plugin/appearance/src/plugin/camera/types/camera.d.ts +4 -0
  64. package/dist/plugin/appearance/src/plugin/camera/types/index.d.ts +13 -0
  65. package/dist/plugin/appearance/src/plugin/camera/utils/try-open-camera.d.ts +2 -0
  66. package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +3 -0
  67. package/dist/plugin/appearance/src/plugin/clipboard/index.d.ts +5 -0
  68. package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +4 -0
  69. package/dist/plugin/appearance/src/plugin/clipboard/types/index.d.ts +11 -0
  70. package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +35 -0
  71. package/dist/plugin/appearance/src/plugin/fullscreen/index.d.ts +5 -0
  72. package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +17 -0
  73. package/dist/plugin/appearance/src/plugin/fullscreen/types/index.d.ts +11 -0
  74. package/dist/plugin/appearance/src/plugin/theme/constants/index.d.ts +14 -0
  75. package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +3 -0
  76. package/dist/plugin/appearance/src/plugin/theme/errors/easing-error.d.ts +6 -0
  77. package/dist/plugin/appearance/src/plugin/theme/errors/unsupported-color-error.d.ts +2 -0
  78. package/dist/plugin/appearance/src/plugin/theme/index.d.ts +17 -0
  79. package/dist/plugin/appearance/src/plugin/theme/types/color.d.ts +17 -0
  80. package/dist/plugin/appearance/src/plugin/theme/types/easing-syntax.d.ts +16 -0
  81. package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +23 -0
  82. package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +24 -0
  83. package/dist/plugin/appearance/src/plugin/theme/utils/parse-color.d.ts +2 -0
  84. package/dist/plugin/appearance/src/plugin/theme/utils/parse-easing-function.d.ts +2 -0
  85. package/dist/plugin/appearance/src/types/event-listener-util.d.ts +11 -0
  86. package/dist/plugin/appearance/src/types/index.d.ts +1 -0
  87. package/dist/plugin/appearance/src/types/native.d.ts +27 -0
  88. package/dist/plugin/appearance/src/types/platform.d.ts +16 -0
  89. package/dist/plugin/appearance/src/utils/assign.d.ts +1 -0
  90. package/dist/plugin/appearance/src/utils/compare-version.d.ts +1 -0
  91. package/dist/plugin/appearance/src/utils/create-custom-error.d.ts +6 -0
  92. package/dist/plugin/appearance/src/utils/create-hidden-element.d.ts +1 -0
  93. package/dist/plugin/appearance/src/utils/dispatch-click-event.d.ts +1 -0
  94. package/dist/plugin/appearance/src/utils/event-listener-utils.d.ts +3 -0
  95. package/dist/plugin/appearance/src/utils/get-topmost-window.d.ts +1 -0
  96. package/dist/plugin/appearance/src/utils/is-secure-context.d.ts +1 -0
  97. package/dist/plugin/camera/index.cjs +17 -15
  98. package/dist/plugin/camera/index.min.cjs +1 -1
  99. package/dist/plugin/camera/index.min.mjs +1 -1
  100. package/dist/plugin/camera/index.mjs +17 -15
  101. package/dist/plugin/camera/index.umd.js +17 -15
  102. package/dist/plugin/camera/index.umd.min.js +1 -1
  103. package/dist/plugin/camera/src/plugin/app/constants/index.d.ts +12 -0
  104. package/dist/plugin/camera/src/plugin/app/cores/index.d.ts +3 -0
  105. package/dist/plugin/camera/src/plugin/app/index.d.ts +1 -1
  106. package/dist/plugin/camera/src/plugin/app/types/app.d.ts +6 -1
  107. package/dist/plugin/camera/src/plugin/app/types/index.d.ts +2 -2
  108. package/dist/plugin/camera/src/plugin/appearance/constants/index.d.ts +11 -0
  109. package/dist/plugin/camera/src/plugin/appearance/cores/index.d.ts +3 -0
  110. package/dist/plugin/camera/src/plugin/appearance/index.d.ts +8 -0
  111. package/dist/plugin/camera/src/plugin/appearance/types/appearance.d.ts +6 -0
  112. package/dist/plugin/camera/src/plugin/appearance/types/index.d.ts +13 -0
  113. package/dist/plugin/camera/src/plugin/camera/constants/inedx.d.ts +4 -0
  114. package/dist/plugin/camera/src/plugin/camera/cores/index.d.ts +3 -0
  115. package/dist/plugin/camera/src/plugin/camera/index.d.ts +1 -1
  116. package/dist/plugin/camera/src/plugin/camera/types/camera.d.ts +1 -1
  117. package/dist/plugin/camera/src/plugin/camera/types/index.d.ts +1 -1
  118. package/dist/plugin/camera/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  119. package/dist/plugin/camera/src/plugin/clipboard/cores/index.d.ts +3 -0
  120. package/dist/plugin/camera/src/plugin/fullscreen/cores/index.d.ts +35 -0
  121. package/dist/plugin/camera/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  122. package/dist/plugin/camera/src/plugin/theme/constants/index.d.ts +14 -0
  123. package/dist/plugin/camera/src/plugin/theme/cores/index.d.ts +3 -0
  124. package/dist/plugin/camera/src/plugin/theme/index.d.ts +1 -1
  125. package/dist/plugin/camera/src/plugin/theme/types/index.d.ts +1 -1
  126. package/dist/plugin/camera/src/plugin/theme/types/theme.d.ts +1 -1
  127. package/dist/plugin/clipboard/index.cjs +17 -15
  128. package/dist/plugin/clipboard/index.min.cjs +1 -1
  129. package/dist/plugin/clipboard/index.min.mjs +1 -1
  130. package/dist/plugin/clipboard/index.mjs +17 -15
  131. package/dist/plugin/clipboard/index.umd.js +17 -15
  132. package/dist/plugin/clipboard/index.umd.min.js +1 -1
  133. package/dist/plugin/clipboard/src/plugin/app/constants/index.d.ts +12 -0
  134. package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +3 -0
  135. package/dist/plugin/clipboard/src/plugin/app/index.d.ts +1 -1
  136. package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +6 -1
  137. package/dist/plugin/clipboard/src/plugin/app/types/index.d.ts +2 -2
  138. package/dist/plugin/clipboard/src/plugin/appearance/constants/index.d.ts +11 -0
  139. package/dist/plugin/clipboard/src/plugin/appearance/cores/index.d.ts +3 -0
  140. package/dist/plugin/clipboard/src/plugin/appearance/index.d.ts +8 -0
  141. package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +6 -0
  142. package/dist/plugin/clipboard/src/plugin/appearance/types/index.d.ts +13 -0
  143. package/dist/plugin/clipboard/src/plugin/camera/constants/inedx.d.ts +4 -0
  144. package/dist/plugin/clipboard/src/plugin/camera/cores/index.d.ts +3 -0
  145. package/dist/plugin/clipboard/src/plugin/camera/index.d.ts +1 -1
  146. package/dist/plugin/clipboard/src/plugin/camera/types/camera.d.ts +1 -1
  147. package/dist/plugin/clipboard/src/plugin/camera/types/index.d.ts +1 -1
  148. package/dist/plugin/clipboard/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  149. package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +3 -0
  150. package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +35 -0
  151. package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  152. package/dist/plugin/clipboard/src/plugin/theme/constants/index.d.ts +14 -0
  153. package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +3 -0
  154. package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +1 -1
  155. package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +1 -1
  156. package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +1 -1
  157. package/dist/plugin/fullscreen/index.cjs +336 -339
  158. package/dist/plugin/fullscreen/index.d.ts +10 -11
  159. package/dist/plugin/fullscreen/index.min.cjs +1 -1
  160. package/dist/plugin/fullscreen/index.min.mjs +1 -1
  161. package/dist/plugin/fullscreen/index.mjs +336 -339
  162. package/dist/plugin/fullscreen/index.umd.js +336 -339
  163. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  164. package/dist/plugin/fullscreen/src/plugin/app/constants/index.d.ts +12 -0
  165. package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +3 -0
  166. package/dist/plugin/fullscreen/src/plugin/app/index.d.ts +1 -1
  167. package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +6 -1
  168. package/dist/plugin/fullscreen/src/plugin/app/types/index.d.ts +2 -2
  169. package/dist/plugin/fullscreen/src/plugin/appearance/constants/index.d.ts +11 -0
  170. package/dist/plugin/fullscreen/src/plugin/appearance/cores/index.d.ts +3 -0
  171. package/dist/plugin/fullscreen/src/plugin/appearance/index.d.ts +8 -0
  172. package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +6 -0
  173. package/dist/plugin/fullscreen/src/plugin/appearance/types/index.d.ts +13 -0
  174. package/dist/plugin/fullscreen/src/plugin/camera/constants/inedx.d.ts +4 -0
  175. package/dist/plugin/fullscreen/src/plugin/camera/cores/index.d.ts +3 -0
  176. package/dist/plugin/fullscreen/src/plugin/camera/index.d.ts +1 -1
  177. package/dist/plugin/fullscreen/src/plugin/camera/types/camera.d.ts +1 -1
  178. package/dist/plugin/fullscreen/src/plugin/camera/types/index.d.ts +1 -1
  179. package/dist/plugin/fullscreen/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  180. package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +3 -0
  181. package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +35 -0
  182. package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  183. package/dist/plugin/fullscreen/src/plugin/theme/constants/index.d.ts +14 -0
  184. package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +3 -0
  185. package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +1 -1
  186. package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +1 -1
  187. package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +1 -1
  188. package/dist/plugin/theme/index.cjs +17 -15
  189. package/dist/plugin/theme/index.min.cjs +1 -1
  190. package/dist/plugin/theme/index.min.mjs +1 -1
  191. package/dist/plugin/theme/index.mjs +17 -15
  192. package/dist/plugin/theme/index.umd.js +17 -15
  193. package/dist/plugin/theme/index.umd.min.js +1 -1
  194. package/dist/plugin/theme/src/plugin/app/constants/index.d.ts +12 -0
  195. package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +3 -0
  196. package/dist/plugin/theme/src/plugin/app/index.d.ts +1 -1
  197. package/dist/plugin/theme/src/plugin/app/types/app.d.ts +6 -1
  198. package/dist/plugin/theme/src/plugin/app/types/index.d.ts +2 -2
  199. package/dist/plugin/theme/src/plugin/appearance/constants/index.d.ts +11 -0
  200. package/dist/plugin/theme/src/plugin/appearance/cores/index.d.ts +3 -0
  201. package/dist/plugin/theme/src/plugin/appearance/index.d.ts +8 -0
  202. package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +6 -0
  203. package/dist/plugin/theme/src/plugin/appearance/types/index.d.ts +13 -0
  204. package/dist/plugin/theme/src/plugin/camera/constants/inedx.d.ts +4 -0
  205. package/dist/plugin/theme/src/plugin/camera/cores/index.d.ts +3 -0
  206. package/dist/plugin/theme/src/plugin/camera/index.d.ts +1 -1
  207. package/dist/plugin/theme/src/plugin/camera/types/camera.d.ts +1 -1
  208. package/dist/plugin/theme/src/plugin/camera/types/index.d.ts +1 -1
  209. package/dist/plugin/theme/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  210. package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +3 -0
  211. package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +35 -0
  212. package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  213. package/dist/plugin/theme/src/plugin/theme/constants/index.d.ts +14 -0
  214. package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +3 -0
  215. package/dist/plugin/theme/src/plugin/theme/index.d.ts +1 -1
  216. package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +1 -1
  217. package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +1 -1
  218. package/dist/src/plugin/app/constants/index.d.ts +12 -0
  219. package/dist/src/plugin/app/cores/index.d.ts +3 -0
  220. package/dist/src/plugin/app/index.d.ts +1 -1
  221. package/dist/src/plugin/app/types/app.d.ts +6 -1
  222. package/dist/src/plugin/app/types/index.d.ts +2 -2
  223. package/dist/src/plugin/appearance/constants/index.d.ts +11 -0
  224. package/dist/src/plugin/appearance/cores/index.d.ts +3 -0
  225. package/dist/src/plugin/appearance/index.d.ts +8 -0
  226. package/dist/src/plugin/appearance/types/appearance.d.ts +6 -0
  227. package/dist/src/plugin/appearance/types/index.d.ts +13 -0
  228. package/dist/src/plugin/camera/constants/inedx.d.ts +4 -0
  229. package/dist/src/plugin/camera/cores/index.d.ts +3 -0
  230. package/dist/src/plugin/camera/index.d.ts +1 -1
  231. package/dist/src/plugin/camera/types/camera.d.ts +1 -1
  232. package/dist/src/plugin/camera/types/index.d.ts +1 -1
  233. package/dist/src/plugin/camera/utils/try-open-camera.d.ts +1 -1
  234. package/dist/src/plugin/clipboard/cores/index.d.ts +3 -0
  235. package/dist/src/plugin/fullscreen/cores/index.d.ts +35 -0
  236. package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +9 -3
  237. package/dist/src/plugin/theme/constants/index.d.ts +14 -0
  238. package/dist/src/plugin/theme/cores/index.d.ts +3 -0
  239. package/dist/src/plugin/theme/index.d.ts +1 -1
  240. package/dist/src/plugin/theme/types/index.d.ts +1 -1
  241. package/dist/src/plugin/theme/types/theme.d.ts +1 -1
  242. package/package.json +1 -1
@@ -254,7 +254,7 @@ function resolveSemanticAndroidVersion(version, defaultValue) {
254
254
  if (version.major === 21)
255
255
  return '5.0';
256
256
  if (version.major === 20)
257
- return '4.4W';
257
+ return '4.4';
258
258
  if (version.major === 19)
259
259
  return '4.4';
260
260
  if (version.major === 18)
@@ -446,19 +446,21 @@ if (IS_NODE_JS) {
446
446
  catch (_) {
447
447
  }
448
448
  }
449
- document.addEventListener("deviceready", function () {
450
- if (Platform.os === OS.Unknown && typeof globalThis.device !== 'undefined') {
451
- switch (globalThis.device.platform) {
452
- case 'Android':
453
- Platform.os = OS.Android;
454
- break;
455
- case 'iOS':
456
- Platform.os = OS.iOS;
457
- break;
449
+ if (typeof globalThis.document !== 'undefined') {
450
+ globalThis.document.addEventListener("deviceready", function () {
451
+ if (Platform.os === OS.Unknown && typeof globalThis.device !== 'undefined') {
452
+ switch (globalThis.device.platform) {
453
+ case 'Android':
454
+ Platform.os = OS.Android;
455
+ break;
456
+ case 'iOS':
457
+ Platform.os = OS.iOS;
458
+ break;
459
+ }
460
+ Platform.osVersion = globalThis.device.version;
458
461
  }
459
- Platform.osVersion = globalThis.device.version;
460
- }
461
- }, false);
462
+ }, false);
463
+ }
462
464
  if (navigator.userAgentData !== undefined && navigator.userAgentData.getHighEntropyValues !== undefined) {
463
465
  navigator
464
466
  .userAgentData
@@ -488,6 +490,27 @@ Platform.isMobile = Platform.device === Devices.Mobile;
488
490
  Platform.isDesktop = Platform.device === Devices.Desktop;
489
491
  Platform.isStandalone = getIsStandalone(Platform.os);
490
492
 
493
+ var Index = {
494
+ get enabled() {
495
+ return getEnabled();
496
+ },
497
+ get element() {
498
+ return getElement();
499
+ },
500
+ get isFullscreen() {
501
+ return getIsFullscreen();
502
+ },
503
+ request: request,
504
+ exit: exit,
505
+ toggle: toggle,
506
+ onchange: onchange,
507
+ onerror: onerror,
508
+ };
509
+ var lastIOSVideo = null;
510
+ var lastElectronBrowserWindow = null;
511
+ var lastElectronBrowserWindowOptions = null;
512
+ var eventsBridged = false;
513
+ var api = detectApi();
491
514
  var API_VARIANTS = {
492
515
  standard: {
493
516
  enabled: 'fullscreenEnabled',
@@ -528,15 +551,15 @@ function detectApi() {
528
551
  var keys = ['webkit', 'moz', 'ms'];
529
552
  for (var i = 0; i < keys.length; i++) {
530
553
  var key = keys[i];
531
- var api = API_VARIANTS[key];
532
- if (api.enabled in globalThis.document || api.element in globalThis.document || api.exit in globalThis.document) {
554
+ var api_1 = API_VARIANTS[key];
555
+ if (api_1.enabled in globalThis.document || api_1.element in globalThis.document || api_1.exit in globalThis.document) {
533
556
  if (key === 'webkit' && 'webkitRequestFullScreen' in element)
534
- api.request = 'webkitRequestFullScreen';
535
- return api;
557
+ api_1.request = 'webkitRequestFullScreen';
558
+ return api_1;
536
559
  }
537
560
  }
538
561
  if ('webkitCurrentFullScreenElement' in globalThis.document) {
539
- var api = {
562
+ var api_2 = {
540
563
  enabled: 'webkitFullscreenEnabled',
541
564
  element: 'webkitCurrentFullScreenElement',
542
565
  request: 'webkitRequestFullscreen',
@@ -544,71 +567,79 @@ function detectApi() {
544
567
  events: API_VARIANTS.webkit.events,
545
568
  };
546
569
  if ('webkitRequestFullScreen' in element)
547
- api.request = 'webkitRequestFullScreen';
548
- return api;
570
+ api_2.request = 'webkitRequestFullScreen';
571
+ return api_2;
549
572
  }
550
573
  return null;
551
574
  }
552
- function createFullscreenUtils() {
553
- var api = detectApi();
554
- var lastIOSVideo = null;
555
- var lastElectronBrowserWindow = null;
556
- var lastElectronBrowserWindowOptions = null;
557
- var eventsBridged = false;
558
- function getDefaultTarget() {
559
- if (IS_ELECTRON) {
560
- var electron = require('electron');
561
- var focusedWindow = electron.BrowserWindow.getFocusedWindow();
562
- if (focusedWindow !== null)
563
- return focusedWindow;
564
- var allWindows = electron.BrowserWindow.getAllWindows();
565
- if (allWindows.length === 0)
566
- throw new Error();
567
- return allWindows[0];
568
- }
569
- if (OS.iOS === Platform.os) {
570
- var video = globalThis.document.querySelector('video');
571
- if (video === null)
572
- throw new Error();
573
- return video;
574
- }
575
- return globalThis.document.documentElement;
575
+ function getDefaultTarget() {
576
+ if (IS_ELECTRON) {
577
+ var electron = require('electron');
578
+ var focusedWindow = electron.BrowserWindow.getFocusedWindow();
579
+ if (focusedWindow !== null)
580
+ return focusedWindow;
581
+ var allWindows = electron.BrowserWindow.getAllWindows();
582
+ if (allWindows.length === 0)
583
+ throw new Error();
584
+ return allWindows[0];
576
585
  }
577
- function restoreElectronBrowserWindowOptions() {
578
- if (lastElectronBrowserWindowOptions !== null) {
579
- lastElectronBrowserWindow.fullScreenable = lastElectronBrowserWindowOptions.fullScreenable;
580
- lastElectronBrowserWindow.autoHideMenuBar = lastElectronBrowserWindowOptions.autoHideMenuBar;
581
- lastElectronBrowserWindowOptions = null;
582
- }
583
- lastElectronBrowserWindow = null;
586
+ if (OS.iOS === Platform.os) {
587
+ var video = globalThis.document.querySelector('video');
588
+ if (video === null)
589
+ throw new Error();
590
+ return video;
584
591
  }
585
- function bridgeEvents() {
586
- if (eventsBridged)
592
+ return globalThis.document.documentElement;
593
+ }
594
+ function restoreElectronBrowserWindowOptions() {
595
+ if (lastElectronBrowserWindowOptions !== null) {
596
+ lastElectronBrowserWindow.fullScreenable = lastElectronBrowserWindowOptions.fullScreenable;
597
+ lastElectronBrowserWindow.autoHideMenuBar = lastElectronBrowserWindowOptions.autoHideMenuBar;
598
+ lastElectronBrowserWindowOptions = null;
599
+ }
600
+ lastElectronBrowserWindow = null;
601
+ }
602
+ function bridgeEvents() {
603
+ if (eventsBridged)
604
+ return;
605
+ eventsBridged = true;
606
+ var dispatching = false;
607
+ function emit(type) {
608
+ if (dispatching)
587
609
  return;
588
- eventsBridged = true;
589
- var dispatching = false;
590
- function emit(type) {
591
- if (dispatching)
592
- return;
593
- dispatching = true;
594
- if (typeof globalThis.document !== 'undefined')
595
- globalThis.document.dispatchEvent(new Event(type, { bubbles: true, cancelable: false }));
596
- Promise.resolve().then(function () {
597
- dispatching = false;
598
- });
599
- }
600
- function emitChange() {
601
- emit('fullscreenchange');
602
- }
603
- function emitError() {
604
- emit('fullscreenerror');
605
- }
606
- if (IS_ELECTRON) {
607
- try {
608
- var electron = require('electron');
609
- var allWindows = electron.BrowserWindow.getAllWindows();
610
- var _loop_1 = function (i) {
611
- var currentWindow = allWindows[i];
610
+ dispatching = true;
611
+ if (typeof globalThis.document !== 'undefined')
612
+ globalThis.document.dispatchEvent(new Event(type, { bubbles: true, cancelable: false }));
613
+ Promise.resolve().then(function () {
614
+ dispatching = false;
615
+ });
616
+ }
617
+ function emitChange() {
618
+ emit('fullscreenchange');
619
+ }
620
+ function emitError() {
621
+ emit('fullscreenerror');
622
+ }
623
+ if (IS_ELECTRON) {
624
+ try {
625
+ var electron = require('electron');
626
+ var allWindows = electron.BrowserWindow.getAllWindows();
627
+ var _loop_1 = function (i) {
628
+ var currentWindow = allWindows[i];
629
+ currentWindow.on('enter-full-screen', function () {
630
+ lastElectronBrowserWindow = currentWindow;
631
+ emitChange();
632
+ });
633
+ currentWindow.on('leave-full-screen', function () {
634
+ restoreElectronBrowserWindowOptions();
635
+ emitChange();
636
+ });
637
+ };
638
+ for (var i = 0; i < allWindows.length; i++) {
639
+ _loop_1(i);
640
+ }
641
+ if (typeof electron.BrowserWindow.on === 'function') {
642
+ electron.BrowserWindow.on('browser-window-created', function (_, currentWindow) {
612
643
  currentWindow.on('enter-full-screen', function () {
613
644
  lastElectronBrowserWindow = currentWindow;
614
645
  emitChange();
@@ -617,223 +648,145 @@ function createFullscreenUtils() {
617
648
  restoreElectronBrowserWindowOptions();
618
649
  emitChange();
619
650
  });
620
- };
621
- for (var i = 0; i < allWindows.length; i++) {
622
- _loop_1(i);
623
- }
624
- if (typeof electron.BrowserWindow.on === 'function') {
625
- electron.BrowserWindow.on('browser-window-created', function (_, currentWindow) {
626
- currentWindow.on('enter-full-screen', function () {
627
- lastElectronBrowserWindow = currentWindow;
628
- emitChange();
629
- });
630
- currentWindow.on('leave-full-screen', function () {
631
- restoreElectronBrowserWindowOptions();
632
- emitChange();
633
- });
634
- });
635
- }
636
- }
637
- catch (_) {
638
- }
639
- }
640
- var changeEvents = ['webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];
641
- var errorEvents = ['webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError'];
642
- for (var i = 0; i < changeEvents.length; i++) {
643
- if (typeof globalThis.document !== 'undefined')
644
- globalThis.document.addEventListener(changeEvents[i], emitChange, false);
645
- }
646
- for (var i = 0; i < errorEvents.length; i++) {
647
- if (typeof globalThis.document !== 'undefined')
648
- globalThis.document.addEventListener(errorEvents[i], emitError, false);
649
- }
650
- if (OS.iOS === Platform.os) {
651
- bridgeIOSVideoEvents();
652
- if (typeof globalThis.MutationObserver !== 'undefined') {
653
- var observer = new MutationObserver(function () {
654
- bridgeIOSVideoEvents();
655
651
  });
656
- observer.observe(globalThis.document.documentElement, { childList: true, subtree: true });
657
652
  }
658
653
  }
654
+ catch (_) {
655
+ }
659
656
  }
660
- function bridgeIOSVideoEvents() {
661
- if (typeof globalThis.document !== 'undefined') {
662
- var videos = globalThis.document.querySelectorAll('video');
663
- videos.forEach(function (video) {
664
- if (video.__fsBridged__ || !('webkitEnterFullscreen' in video || 'onwebkitbeginfullscreen' in video))
665
- return;
666
- function emitChange() {
667
- globalThis.document.dispatchEvent(new Event('fullscreenchange'));
668
- }
669
- video.addEventListener('webkitbeginfullscreen', emitChange, false);
670
- video.addEventListener('webkitendfullscreen', emitChange, false);
671
- video.__fsBridged__ = true;
657
+ var changeEvents = ['webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];
658
+ var errorEvents = ['webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError'];
659
+ for (var i = 0; i < changeEvents.length; i++) {
660
+ if (typeof globalThis.document !== 'undefined')
661
+ globalThis.document.addEventListener(changeEvents[i], emitChange, false);
662
+ }
663
+ for (var i = 0; i < errorEvents.length; i++) {
664
+ if (typeof globalThis.document !== 'undefined')
665
+ globalThis.document.addEventListener(errorEvents[i], emitError, false);
666
+ }
667
+ if (OS.iOS === Platform.os) {
668
+ bridgeIOSVideoEvents();
669
+ if (typeof globalThis.MutationObserver !== 'undefined') {
670
+ var observer = new MutationObserver(function () {
671
+ bridgeIOSVideoEvents();
672
672
  });
673
+ observer.observe(globalThis.document.documentElement, { childList: true, subtree: true });
673
674
  }
674
675
  }
675
- function getEnabled() {
676
- if (IS_ELECTRON) {
677
- try {
678
- var electron = require('electron');
679
- return typeof electron.BrowserWindow.prototype.setFullScreen === 'function';
680
- }
681
- catch (_) {
682
- return false;
676
+ }
677
+ function bridgeIOSVideoEvents() {
678
+ if (typeof globalThis.document !== 'undefined') {
679
+ var videos = globalThis.document.querySelectorAll('video');
680
+ videos.forEach(function (video) {
681
+ if (video.__fsBridged__ || !('webkitEnterFullscreen' in video || 'onwebkitbeginfullscreen' in video))
682
+ return;
683
+ function emitChange() {
684
+ globalThis.document.dispatchEvent(new Event('fullscreenchange'));
683
685
  }
686
+ video.addEventListener('webkitbeginfullscreen', emitChange, false);
687
+ video.addEventListener('webkitendfullscreen', emitChange, false);
688
+ video.__fsBridged__ = true;
689
+ });
690
+ }
691
+ }
692
+ function getEnabled() {
693
+ if (IS_ELECTRON) {
694
+ try {
695
+ var electron = require('electron');
696
+ return typeof electron.BrowserWindow.prototype.setFullScreen === 'function';
684
697
  }
685
- if (api === null) {
686
- if (OS.iOS !== Platform.os)
687
- return false;
688
- var videos = globalThis.document.querySelectorAll('video');
689
- for (var i = 0; i < videos.length; i++) {
690
- var video = videos[i];
691
- if (video.webkitSupportsFullscreen || 'webkitEnterFullscreen' in video)
692
- return true;
693
- }
698
+ catch (_) {
694
699
  return false;
695
700
  }
696
- var enabledValue = globalThis.document[api.enabled];
697
- if (typeof enabledValue === 'boolean')
698
- return enabledValue;
699
- return typeof globalThis.document[api.element] !== 'undefined';
700
- }
701
- function getElement() {
702
- if (IS_ELECTRON) {
703
- if (lastElectronBrowserWindow !== null)
704
- return lastElectronBrowserWindow;
705
- try {
706
- var electron = require('electron');
707
- var allWindows = electron.BrowserWindow.getAllWindows();
708
- for (var i = 0; i < allWindows.length; i++) {
709
- var currentWindow = allWindows[i];
710
- if (currentWindow.isFullScreen() || (Platform.os === OS.MacOS && typeof currentWindow.isSimpleFullScreen === 'function' && currentWindow.isSimpleFullScreen()))
711
- return currentWindow;
712
- }
713
- return null;
714
- }
715
- catch (_) {
716
- return null;
701
+ }
702
+ if (api === null) {
703
+ if (OS.iOS !== Platform.os)
704
+ return false;
705
+ var videos = globalThis.document.querySelectorAll('video');
706
+ for (var i = 0; i < videos.length; i++) {
707
+ var video = videos[i];
708
+ if (video.webkitSupportsFullscreen || 'webkitEnterFullscreen' in video)
709
+ return true;
710
+ }
711
+ return false;
712
+ }
713
+ var enabledValue = globalThis.document[api.enabled];
714
+ if (typeof enabledValue === 'boolean')
715
+ return enabledValue;
716
+ return typeof globalThis.document[api.element] !== 'undefined';
717
+ }
718
+ function getElement() {
719
+ if (IS_ELECTRON) {
720
+ if (lastElectronBrowserWindow !== null)
721
+ return lastElectronBrowserWindow;
722
+ try {
723
+ var electron = require('electron');
724
+ var allWindows = electron.BrowserWindow.getAllWindows();
725
+ for (var i = 0; i < allWindows.length; i++) {
726
+ var currentWindow = allWindows[i];
727
+ if (currentWindow.isFullScreen() || (Platform.os === OS.MacOS && typeof currentWindow.isSimpleFullScreen === 'function' && currentWindow.isSimpleFullScreen()))
728
+ return currentWindow;
717
729
  }
730
+ return null;
718
731
  }
719
- if (api === null) {
720
- if (lastIOSVideo && lastIOSVideo.webkitDisplayingFullscreen)
721
- return lastIOSVideo;
732
+ catch (_) {
722
733
  return null;
723
734
  }
724
- var currentElement = globalThis.document[api.element];
725
- if (currentElement !== null && currentElement !== undefined)
726
- return currentElement;
727
- return null;
728
735
  }
729
- function getIsFullscreen() {
730
- return getElement() !== null;
736
+ if (api === null) {
737
+ if (lastIOSVideo && lastIOSVideo.webkitDisplayingFullscreen)
738
+ return lastIOSVideo;
739
+ return null;
731
740
  }
732
- function request(target, options) {
733
- if (target === void 0) { target = getDefaultTarget(); }
734
- if (IS_ELECTRON) {
735
- var browserWindow_1 = target;
736
- return new Promise(function (resolve, reject) {
737
- try {
738
- if (lastElectronBrowserWindow === null) {
739
- lastElectronBrowserWindowOptions = {
740
- fullScreenable: browserWindow_1.fullScreenable,
741
- autoHideMenuBar: browserWindow_1.autoHideMenuBar,
742
- };
743
- browserWindow_1.fullScreenable = true;
744
- browserWindow_1.autoHideMenuBar = true;
745
- }
746
- browserWindow_1.setFullScreen(true);
747
- lastElectronBrowserWindow = browserWindow_1;
748
- resolve();
749
- return;
750
- }
751
- catch (_) {
752
- reject();
753
- }
754
- });
755
- }
741
+ var currentElement = globalThis.document[api.element];
742
+ if (currentElement !== null && currentElement !== undefined)
743
+ return currentElement;
744
+ return null;
745
+ }
746
+ function getIsFullscreen() {
747
+ return getElement() !== null;
748
+ }
749
+ function request(target, options) {
750
+ if (target === void 0) { target = getDefaultTarget(); }
751
+ if (IS_ELECTRON) {
752
+ var browserWindow_1 = target;
756
753
  return new Promise(function (resolve, reject) {
757
- if (api !== null) {
758
- var method = target[api.request];
759
- if (typeof method === 'function') {
760
- try {
761
- var result = method.call(target, options);
762
- if (result !== undefined && typeof result.then === 'function') {
763
- result
764
- .then(function () {
765
- resolve();
766
- })
767
- .catch(function () {
768
- if (OS.iOS !== Platform.os) {
769
- reject();
770
- return;
771
- }
772
- fallbackToIOSVideo();
773
- });
774
- return;
775
- }
776
- else {
777
- resolve();
778
- return;
779
- }
780
- }
781
- catch (error) {
782
- if (OS.iOS !== Platform.os) {
783
- reject();
784
- return;
785
- }
786
- }
754
+ try {
755
+ if (lastElectronBrowserWindow === null) {
756
+ lastElectronBrowserWindowOptions = {
757
+ fullScreenable: browserWindow_1.fullScreenable,
758
+ autoHideMenuBar: browserWindow_1.autoHideMenuBar,
759
+ };
760
+ browserWindow_1.fullScreenable = true;
761
+ browserWindow_1.autoHideMenuBar = true;
787
762
  }
763
+ browserWindow_1.setFullScreen(true);
764
+ lastElectronBrowserWindow = browserWindow_1;
765
+ resolve();
766
+ return;
788
767
  }
789
- function fallbackToIOSVideo() {
790
- if (OS.iOS === Platform.os && target.tagName.toUpperCase() === 'VIDEO') {
791
- var video = target;
792
- if (video.webkitSupportsFullscreen && typeof video.webkitEnterFullscreen === 'function') {
793
- lastIOSVideo = video;
794
- bridgeIOSVideoEvents();
795
- video.webkitEnterFullscreen();
796
- resolve();
797
- return;
798
- }
799
- }
768
+ catch (_) {
800
769
  reject();
801
770
  }
802
- fallbackToIOSVideo();
803
771
  });
804
772
  }
805
- function exit() {
806
- if (IS_ELECTRON) {
807
- return new Promise(function (resolve, reject) {
773
+ return new Promise(function (resolve, reject) {
774
+ if (api !== null) {
775
+ var method = target[api.request];
776
+ if (typeof method === 'function') {
808
777
  try {
809
- if (lastElectronBrowserWindow !== null) {
810
- lastElectronBrowserWindow.setFullScreen(false);
811
- restoreElectronBrowserWindowOptions();
812
- }
813
- else {
814
- var browserWindow = getElement();
815
- if (browserWindow !== null)
816
- browserWindow.setFullScreen(false);
817
- }
818
- resolve();
819
- }
820
- catch (_) {
821
- reject();
822
- }
823
- });
824
- }
825
- return new Promise(function (resolve, reject) {
826
- if (api !== null) {
827
- var method = globalThis.document[api.exit];
828
- if (typeof method === 'function') {
829
- var result = method.call(globalThis.document);
778
+ var result = method.call(target, options);
830
779
  if (result !== undefined && typeof result.then === 'function') {
831
780
  result
832
781
  .then(function () {
833
782
  resolve();
834
783
  })
835
784
  .catch(function () {
836
- reject();
785
+ if (OS.iOS !== Platform.os) {
786
+ reject();
787
+ return;
788
+ }
789
+ fallbackToIOSVideo();
837
790
  });
838
791
  return;
839
792
  }
@@ -842,103 +795,147 @@ function createFullscreenUtils() {
842
795
  return;
843
796
  }
844
797
  }
798
+ catch (error) {
799
+ if (OS.iOS !== Platform.os) {
800
+ reject();
801
+ return;
802
+ }
803
+ }
845
804
  }
846
- if (OS.iOS === Platform.os && lastIOSVideo !== null) {
847
- if (typeof lastIOSVideo.webkitExitFullscreen === 'function' && lastIOSVideo.webkitDisplayingFullscreen === true) {
848
- lastIOSVideo.webkitExitFullscreen();
849
- lastIOSVideo = null;
805
+ }
806
+ function fallbackToIOSVideo() {
807
+ if (OS.iOS === Platform.os && target.tagName.toUpperCase() === 'VIDEO') {
808
+ var video = target;
809
+ if (video.webkitSupportsFullscreen && typeof video.webkitEnterFullscreen === 'function') {
810
+ lastIOSVideo = video;
811
+ bridgeIOSVideoEvents();
812
+ video.webkitEnterFullscreen();
850
813
  resolve();
851
814
  return;
852
815
  }
853
- var videos = globalThis.document.querySelectorAll('video');
854
- for (var i = 0; i < videos.length; i++) {
855
- var video = videos[i];
856
- if (typeof video.webkitExitFullscreen === 'function' && video.webkitDisplayingFullscreen === true) {
857
- video.webkitExitFullscreen();
858
- resolve();
859
- return;
860
- }
861
- }
862
816
  }
863
- if (!getElement()) {
817
+ reject();
818
+ }
819
+ fallbackToIOSVideo();
820
+ });
821
+ }
822
+ function exit() {
823
+ if (IS_ELECTRON) {
824
+ return new Promise(function (resolve, reject) {
825
+ try {
826
+ if (lastElectronBrowserWindow !== null) {
827
+ lastElectronBrowserWindow.setFullScreen(false);
828
+ restoreElectronBrowserWindowOptions();
829
+ }
830
+ else {
831
+ var browserWindow = getElement();
832
+ if (browserWindow !== null)
833
+ browserWindow.setFullScreen(false);
834
+ }
864
835
  resolve();
865
- return;
866
836
  }
867
- reject();
837
+ catch (_) {
838
+ reject();
839
+ }
868
840
  });
869
841
  }
870
- function toggle(target, options) {
871
- if (getIsFullscreen())
872
- return exit();
873
- else
874
- return request(target, options);
875
- }
876
- function onChange(handler) {
877
- var listeners = [];
878
- function listen(eventType) {
879
- function wrapper(event) {
880
- handler(event);
842
+ return new Promise(function (resolve, reject) {
843
+ if (api !== null) {
844
+ var method = globalThis.document[api.exit];
845
+ if (typeof method === 'function') {
846
+ var result = method.call(globalThis.document);
847
+ if (result !== undefined && typeof result.then === 'function') {
848
+ result
849
+ .then(function () {
850
+ resolve();
851
+ })
852
+ .catch(function () {
853
+ reject();
854
+ });
855
+ return;
856
+ }
857
+ else {
858
+ resolve();
859
+ return;
860
+ }
881
861
  }
882
- if (typeof globalThis.document === 'undefined')
862
+ }
863
+ if (OS.iOS === Platform.os && lastIOSVideo !== null) {
864
+ if (typeof lastIOSVideo.webkitExitFullscreen === 'function' && lastIOSVideo.webkitDisplayingFullscreen === true) {
865
+ lastIOSVideo.webkitExitFullscreen();
866
+ lastIOSVideo = null;
867
+ resolve();
883
868
  return;
884
- globalThis.document.addEventListener(eventType, wrapper, false);
885
- listeners.push(function () {
886
- globalThis.document.removeEventListener(eventType, wrapper, false);
887
- });
869
+ }
870
+ var videos = globalThis.document.querySelectorAll('video');
871
+ for (var i = 0; i < videos.length; i++) {
872
+ var video = videos[i];
873
+ if (typeof video.webkitExitFullscreen === 'function' && video.webkitDisplayingFullscreen === true) {
874
+ video.webkitExitFullscreen();
875
+ resolve();
876
+ return;
877
+ }
878
+ }
888
879
  }
889
- listen('fullscreenchange');
890
- return function () {
891
- listeners.forEach(function (cleanup) {
892
- cleanup();
893
- });
894
- };
880
+ if (!getElement()) {
881
+ resolve();
882
+ return;
883
+ }
884
+ reject();
885
+ });
886
+ }
887
+ function toggle(target, options) {
888
+ if (getIsFullscreen())
889
+ return exit();
890
+ else
891
+ return request(target, options);
892
+ }
893
+ function onchange(handler) {
894
+ var listeners = [];
895
+ function listen(eventType) {
896
+ function wrapper(event) {
897
+ handler(event);
898
+ }
899
+ if (typeof globalThis.document === 'undefined')
900
+ return;
901
+ globalThis.document.addEventListener(eventType, wrapper, false);
902
+ listeners.push(function () {
903
+ globalThis.document.removeEventListener(eventType, wrapper, false);
904
+ });
895
905
  }
896
- function onError(handler) {
897
- var listeners = [];
898
- function listen(eventType) {
899
- function wrapper(event) {
900
- handler(event);
901
- }
902
- if (typeof globalThis.document === 'undefined')
903
- return;
904
- globalThis.document.addEventListener(eventType, wrapper, false);
905
- listeners.push(function () {
906
- globalThis.document.removeEventListener(eventType, wrapper, false);
907
- });
906
+ listen('fullscreenchange');
907
+ return function () {
908
+ for (var i = 0; i < listeners.length; i++) {
909
+ listeners[i]();
908
910
  }
909
- listen('fullscreenerror');
910
- return function () {
911
- listeners.forEach(function (cleanup) {
912
- cleanup();
913
- });
914
- };
911
+ };
912
+ }
913
+ function onerror(handler) {
914
+ var listeners = [];
915
+ function listen(eventType) {
916
+ function wrapper(event) {
917
+ handler(event);
918
+ }
919
+ if (typeof globalThis.document === 'undefined')
920
+ return;
921
+ globalThis.document.addEventListener(eventType, wrapper, false);
922
+ listeners.push(function () {
923
+ globalThis.document.removeEventListener(eventType, wrapper, false);
924
+ });
915
925
  }
916
- bridgeEvents();
917
- return {
918
- get enabled() {
919
- return getEnabled();
920
- },
921
- get element() {
922
- return getElement();
923
- },
924
- get isFullscreen() {
925
- return getIsFullscreen();
926
- },
927
- request: request,
928
- exit: exit,
929
- toggle: toggle,
930
- onChange: onChange,
931
- onError: onError,
926
+ listen('fullscreenerror');
927
+ return function () {
928
+ for (var i = 0; i < listeners.length; i++) {
929
+ listeners[i]();
930
+ }
932
931
  };
933
932
  }
934
- var FullscreenUtils = createFullscreenUtils();
935
-
936
- var Fullscreen = FullscreenUtils;
933
+ bridgeEvents();
937
934
 
938
935
  var NativeFullscreenPlugin = {
939
936
  installed: false,
940
937
  name: 'Fullscreen',
941
- module: Fullscreen,
938
+ module: Index,
942
939
  Constants: {},
943
940
  Errors: {}
944
941
  };