Add webview support for disabled blink features
This commit is contained in:
parent
ae71cf3df1
commit
ca6e3ed1ef
3 changed files with 11 additions and 1 deletions
|
@ -182,7 +182,8 @@ var attachGuest = function (embedder, elementInstanceId, guestInstanceId, params
|
||||||
plugins: params.plugins,
|
plugins: params.plugins,
|
||||||
zoomFactor: params.zoomFactor,
|
zoomFactor: params.zoomFactor,
|
||||||
webSecurity: !params.disablewebsecurity,
|
webSecurity: !params.disablewebsecurity,
|
||||||
blinkFeatures: params.blinkfeatures
|
blinkFeatures: params.blinkfeatures,
|
||||||
|
disableBlinkFeatures: params.disableBlinkFeatures,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.preload) {
|
if (params.preload) {
|
||||||
|
|
|
@ -264,6 +264,13 @@ class BlinkFeaturesAttribute extends WebViewAttribute {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Attribute that specifies the blink features to be disabled.
|
||||||
|
class DisableBlinkFeaturesAttribute extends WebViewAttribute {
|
||||||
|
constructor (webViewImpl) {
|
||||||
|
super(webViewConstants.ATTRIBUTE_DISBLEBLINKFEATURES, webViewImpl)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Sets up all of the webview attributes.
|
// Sets up all of the webview attributes.
|
||||||
WebViewImpl.prototype.setupWebViewAttributes = function () {
|
WebViewImpl.prototype.setupWebViewAttributes = function () {
|
||||||
this.attributes = {}
|
this.attributes = {}
|
||||||
|
@ -278,6 +285,7 @@ WebViewImpl.prototype.setupWebViewAttributes = function () {
|
||||||
this.attributes[webViewConstants.ATTRIBUTE_ALLOWPOPUPS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_ALLOWPOPUPS, this)
|
this.attributes[webViewConstants.ATTRIBUTE_ALLOWPOPUPS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_ALLOWPOPUPS, this)
|
||||||
this.attributes[webViewConstants.ATTRIBUTE_PRELOAD] = new PreloadAttribute(this)
|
this.attributes[webViewConstants.ATTRIBUTE_PRELOAD] = new PreloadAttribute(this)
|
||||||
this.attributes[webViewConstants.ATTRIBUTE_BLINKFEATURES] = new BlinkFeaturesAttribute(this)
|
this.attributes[webViewConstants.ATTRIBUTE_BLINKFEATURES] = new BlinkFeaturesAttribute(this)
|
||||||
|
this.attributes[webViewConstants.ATTRIBUTE_DISBLEBLINKFEATURES] = new DisableBlinkFeaturesAttribute(this)
|
||||||
|
|
||||||
const autosizeAttributes = [webViewConstants.ATTRIBUTE_MAXHEIGHT, webViewConstants.ATTRIBUTE_MAXWIDTH, webViewConstants.ATTRIBUTE_MINHEIGHT, webViewConstants.ATTRIBUTE_MINWIDTH]
|
const autosizeAttributes = [webViewConstants.ATTRIBUTE_MAXHEIGHT, webViewConstants.ATTRIBUTE_MAXWIDTH, webViewConstants.ATTRIBUTE_MINHEIGHT, webViewConstants.ATTRIBUTE_MINWIDTH]
|
||||||
autosizeAttributes.forEach((attribute) => {
|
autosizeAttributes.forEach((attribute) => {
|
||||||
|
|
|
@ -16,6 +16,7 @@ module.exports = {
|
||||||
ATTRIBUTE_PRELOAD: 'preload',
|
ATTRIBUTE_PRELOAD: 'preload',
|
||||||
ATTRIBUTE_USERAGENT: 'useragent',
|
ATTRIBUTE_USERAGENT: 'useragent',
|
||||||
ATTRIBUTE_BLINKFEATURES: 'blinkfeatures',
|
ATTRIBUTE_BLINKFEATURES: 'blinkfeatures',
|
||||||
|
ATTRIBUTE_DISBLEBLINKFEATURES: 'disableblinkfeatures',
|
||||||
|
|
||||||
// Internal attribute.
|
// Internal attribute.
|
||||||
ATTRIBUTE_INTERNALINSTANCEID: 'internalinstanceid',
|
ATTRIBUTE_INTERNALINSTANCEID: 'internalinstanceid',
|
||||||
|
|
Loading…
Reference in a new issue