chore: update to standard 12
This commit is contained in:
parent
9e85bdb02c
commit
558fff69e7
198 changed files with 4455 additions and 2940 deletions
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const {ipcRenderer, webFrame} = require('electron')
|
||||
const { ipcRenderer, webFrame } = require('electron')
|
||||
|
||||
let requestId = 0
|
||||
|
||||
|
@ -99,7 +99,7 @@ module.exports = {
|
|||
},
|
||||
attachGuest: function (elementInstanceId, guestInstanceId, params, contentWindow) {
|
||||
const embedderFrameId = webFrame.getWebFrameId(contentWindow)
|
||||
if (embedderFrameId < 0) { // this error should not happen.
|
||||
if (embedderFrameId < 0) { // this error should not happen.
|
||||
throw new Error('Invalid embedder frame')
|
||||
}
|
||||
ipcRenderer.send('ELECTRON_GUEST_VIEW_MANAGER_ATTACH_GUEST', embedderFrameId, elementInstanceId, guestInstanceId, params)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const WebViewImpl = require('./web-view')
|
||||
const webViewConstants = require('./web-view-constants')
|
||||
const {remote} = require('electron')
|
||||
const { remote } = require('electron')
|
||||
|
||||
// Helper function to resolve url set in attribute.
|
||||
const a = document.createElement('a')
|
||||
|
@ -142,7 +142,7 @@ class SrcAttribute extends WebViewAttribute {
|
|||
setupMutationObserver () {
|
||||
this.observer = new MutationObserver((mutations) => {
|
||||
for (const mutation of mutations) {
|
||||
const {oldValue} = mutation
|
||||
const { oldValue } = mutation
|
||||
const newValue = this.getValue()
|
||||
if (oldValue !== newValue) {
|
||||
return
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const {ipcRenderer, remote, webFrame} = require('electron')
|
||||
const { ipcRenderer, remote, webFrame } = require('electron')
|
||||
|
||||
const v8Util = process.atomBinding('v8_util')
|
||||
const guestViewInternal = require('./guest-view-internal')
|
||||
|
@ -30,7 +30,7 @@ class WebViewImpl {
|
|||
|
||||
// Create internal iframe element.
|
||||
this.internalElement = this.createInternalElement()
|
||||
const shadowRoot = this.webviewNode.attachShadow({mode: 'open'})
|
||||
const shadowRoot = this.webviewNode.attachShadow({ mode: 'open' })
|
||||
shadowRoot.innerHTML = '<!DOCTYPE html><style type="text/css">:host { display: flex; }</style>'
|
||||
this.setupWebViewAttributes()
|
||||
this.viewInstanceId = getNextId()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue