refactor: ginify InAppPurchase (#24674)
This commit is contained in:
parent
5cfe956fe1
commit
071c5930b9
3 changed files with 24 additions and 22 deletions
|
@ -3,11 +3,7 @@ import { EventEmitter } from 'events';
|
|||
let _inAppPurchase;
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
const { inAppPurchase, InAppPurchase } = process._linkedBinding('electron_browser_in_app_purchase');
|
||||
|
||||
// inAppPurchase is an EventEmitter.
|
||||
Object.setPrototypeOf(InAppPurchase.prototype, EventEmitter.prototype);
|
||||
EventEmitter.call(inAppPurchase);
|
||||
const { inAppPurchase } = process._linkedBinding('electron_browser_in_app_purchase');
|
||||
|
||||
_inAppPurchase = inAppPurchase;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue