Skip to content

Commit 2ce4f14

Browse files
Release build 11.16.0 [ci release]
1 parent 92aa73f commit 2ce4f14

File tree

10 files changed

+236
-98
lines changed

10 files changed

+236
-98
lines changed

CHANGELOG.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- adsjs ping changes (#1922)
1+
- Notification: Add toString and make permission/requestPermission set values (#1934)

build/android/adsjsContentScope.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4082,31 +4082,45 @@
40824082
if (window.Notification) {
40834083
return;
40844084
}
4085+
const NotificationConstructor = function Notification() {
4086+
throw new TypeError("Failed to construct 'Notification': Illegal constructor");
4087+
};
4088+
const wrappedNotification = wrapToString(
4089+
NotificationConstructor,
4090+
NotificationConstructor,
4091+
"function Notification() { [native code] }"
4092+
);
40854093
this.defineProperty(window, "Notification", {
4086-
value: () => {
4087-
},
4094+
value: wrappedNotification,
40884095
writable: true,
40894096
configurable: true,
40904097
enumerable: false
40914098
});
4092-
this.defineProperty(window.Notification, "requestPermission", {
4093-
value: () => {
4094-
return Promise.resolve("denied");
4095-
},
4096-
writable: true,
4097-
configurable: true,
4098-
enumerable: true
4099-
});
41004099
this.defineProperty(window.Notification, "permission", {
4101-
get: () => "denied",
4100+
value: "denied",
4101+
writable: false,
41024102
configurable: true,
4103-
enumerable: false
4103+
enumerable: true
41044104
});
41054105
this.defineProperty(window.Notification, "maxActions", {
41064106
get: () => 2,
41074107
configurable: true,
41084108
enumerable: true
41094109
});
4110+
const requestPermissionFunc = function requestPermission() {
4111+
return Promise.resolve("denied");
4112+
};
4113+
const wrappedRequestPermission = wrapToString(
4114+
requestPermissionFunc,
4115+
requestPermissionFunc,
4116+
"function requestPermission() { [native code] }"
4117+
);
4118+
this.defineProperty(window.Notification, "requestPermission", {
4119+
value: wrappedRequestPermission,
4120+
writable: true,
4121+
configurable: true,
4122+
enumerable: true
4123+
});
41104124
}
41114125
cleanIframeValue() {
41124126
function cleanValueData(val) {

build/android/contentScope.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6817,31 +6817,45 @@
68176817
if (window.Notification) {
68186818
return;
68196819
}
6820+
const NotificationConstructor = function Notification() {
6821+
throw new TypeError("Failed to construct 'Notification': Illegal constructor");
6822+
};
6823+
const wrappedNotification = wrapToString(
6824+
NotificationConstructor,
6825+
NotificationConstructor,
6826+
"function Notification() { [native code] }"
6827+
);
68206828
this.defineProperty(window, "Notification", {
6821-
value: () => {
6822-
},
6829+
value: wrappedNotification,
68236830
writable: true,
68246831
configurable: true,
68256832
enumerable: false
68266833
});
6827-
this.defineProperty(window.Notification, "requestPermission", {
6828-
value: () => {
6829-
return Promise.resolve("denied");
6830-
},
6831-
writable: true,
6832-
configurable: true,
6833-
enumerable: true
6834-
});
68356834
this.defineProperty(window.Notification, "permission", {
6836-
get: () => "denied",
6835+
value: "denied",
6836+
writable: false,
68376837
configurable: true,
6838-
enumerable: false
6838+
enumerable: true
68396839
});
68406840
this.defineProperty(window.Notification, "maxActions", {
68416841
get: () => 2,
68426842
configurable: true,
68436843
enumerable: true
68446844
});
6845+
const requestPermissionFunc = function requestPermission() {
6846+
return Promise.resolve("denied");
6847+
};
6848+
const wrappedRequestPermission = wrapToString(
6849+
requestPermissionFunc,
6850+
requestPermissionFunc,
6851+
"function requestPermission() { [native code] }"
6852+
);
6853+
this.defineProperty(window.Notification, "requestPermission", {
6854+
value: wrappedRequestPermission,
6855+
writable: true,
6856+
configurable: true,
6857+
enumerable: true
6858+
});
68456859
}
68466860
cleanIframeValue() {
68476861
function cleanValueData(val) {

build/apple/contentScope.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4831,31 +4831,45 @@
48314831
if (window.Notification) {
48324832
return;
48334833
}
4834+
const NotificationConstructor = function Notification() {
4835+
throw new TypeError("Failed to construct 'Notification': Illegal constructor");
4836+
};
4837+
const wrappedNotification = wrapToString(
4838+
NotificationConstructor,
4839+
NotificationConstructor,
4840+
"function Notification() { [native code] }"
4841+
);
48344842
this.defineProperty(window, "Notification", {
4835-
value: () => {
4836-
},
4843+
value: wrappedNotification,
48374844
writable: true,
48384845
configurable: true,
48394846
enumerable: false
48404847
});
4841-
this.defineProperty(window.Notification, "requestPermission", {
4842-
value: () => {
4843-
return Promise.resolve("denied");
4844-
},
4845-
writable: true,
4846-
configurable: true,
4847-
enumerable: true
4848-
});
48494848
this.defineProperty(window.Notification, "permission", {
4850-
get: () => "denied",
4849+
value: "denied",
4850+
writable: false,
48514851
configurable: true,
4852-
enumerable: false
4852+
enumerable: true
48534853
});
48544854
this.defineProperty(window.Notification, "maxActions", {
48554855
get: () => 2,
48564856
configurable: true,
48574857
enumerable: true
48584858
});
4859+
const requestPermissionFunc = function requestPermission() {
4860+
return Promise.resolve("denied");
4861+
};
4862+
const wrappedRequestPermission = wrapToString(
4863+
requestPermissionFunc,
4864+
requestPermissionFunc,
4865+
"function requestPermission() { [native code] }"
4866+
);
4867+
this.defineProperty(window.Notification, "requestPermission", {
4868+
value: wrappedRequestPermission,
4869+
writable: true,
4870+
configurable: true,
4871+
enumerable: true
4872+
});
48594873
}
48604874
cleanIframeValue() {
48614875
function cleanValueData(val) {

build/integration/contentScope.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15670,31 +15670,45 @@ ${pageContext}`;
1567015670
if (window.Notification) {
1567115671
return;
1567215672
}
15673+
const NotificationConstructor = function Notification() {
15674+
throw new TypeError("Failed to construct 'Notification': Illegal constructor");
15675+
};
15676+
const wrappedNotification = wrapToString(
15677+
NotificationConstructor,
15678+
NotificationConstructor,
15679+
"function Notification() { [native code] }"
15680+
);
1567315681
this.defineProperty(window, "Notification", {
15674-
value: () => {
15675-
},
15682+
value: wrappedNotification,
1567615683
writable: true,
1567715684
configurable: true,
1567815685
enumerable: false
1567915686
});
15680-
this.defineProperty(window.Notification, "requestPermission", {
15681-
value: () => {
15682-
return Promise.resolve("denied");
15683-
},
15684-
writable: true,
15685-
configurable: true,
15686-
enumerable: true
15687-
});
1568815687
this.defineProperty(window.Notification, "permission", {
15689-
get: () => "denied",
15688+
value: "denied",
15689+
writable: false,
1569015690
configurable: true,
15691-
enumerable: false
15691+
enumerable: true
1569215692
});
1569315693
this.defineProperty(window.Notification, "maxActions", {
1569415694
get: () => 2,
1569515695
configurable: true,
1569615696
enumerable: true
1569715697
});
15698+
const requestPermissionFunc = function requestPermission() {
15699+
return Promise.resolve("denied");
15700+
};
15701+
const wrappedRequestPermission = wrapToString(
15702+
requestPermissionFunc,
15703+
requestPermissionFunc,
15704+
"function requestPermission() { [native code] }"
15705+
);
15706+
this.defineProperty(window.Notification, "requestPermission", {
15707+
value: wrappedRequestPermission,
15708+
writable: true,
15709+
configurable: true,
15710+
enumerable: true
15711+
});
1569815712
}
1569915713
cleanIframeValue() {
1570015714
function cleanValueData(val) {

build/windows/contentScope.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14902,31 +14902,45 @@
1490214902
if (window.Notification) {
1490314903
return;
1490414904
}
14905+
const NotificationConstructor = function Notification() {
14906+
throw new TypeError("Failed to construct 'Notification': Illegal constructor");
14907+
};
14908+
const wrappedNotification = wrapToString(
14909+
NotificationConstructor,
14910+
NotificationConstructor,
14911+
"function Notification() { [native code] }"
14912+
);
1490514913
this.defineProperty(window, "Notification", {
14906-
value: () => {
14907-
},
14914+
value: wrappedNotification,
1490814915
writable: true,
1490914916
configurable: true,
1491014917
enumerable: false
1491114918
});
14912-
this.defineProperty(window.Notification, "requestPermission", {
14913-
value: () => {
14914-
return Promise.resolve("denied");
14915-
},
14916-
writable: true,
14917-
configurable: true,
14918-
enumerable: true
14919-
});
1492014919
this.defineProperty(window.Notification, "permission", {
14921-
get: () => "denied",
14920+
value: "denied",
14921+
writable: false,
1492214922
configurable: true,
14923-
enumerable: false
14923+
enumerable: true
1492414924
});
1492514925
this.defineProperty(window.Notification, "maxActions", {
1492614926
get: () => 2,
1492714927
configurable: true,
1492814928
enumerable: true
1492914929
});
14930+
const requestPermissionFunc = function requestPermission() {
14931+
return Promise.resolve("denied");
14932+
};
14933+
const wrappedRequestPermission = wrapToString(
14934+
requestPermissionFunc,
14935+
requestPermissionFunc,
14936+
"function requestPermission() { [native code] }"
14937+
);
14938+
this.defineProperty(window.Notification, "requestPermission", {
14939+
value: wrappedRequestPermission,
14940+
writable: true,
14941+
configurable: true,
14942+
enumerable: true
14943+
});
1493014944
}
1493114945
cleanIframeValue() {
1493214946
function cleanValueData(val) {

injected/integration-test/extension/contentScope.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15670,31 +15670,45 @@ ${pageContext}`;
1567015670
if (window.Notification) {
1567115671
return;
1567215672
}
15673+
const NotificationConstructor = function Notification() {
15674+
throw new TypeError("Failed to construct 'Notification': Illegal constructor");
15675+
};
15676+
const wrappedNotification = wrapToString(
15677+
NotificationConstructor,
15678+
NotificationConstructor,
15679+
"function Notification() { [native code] }"
15680+
);
1567315681
this.defineProperty(window, "Notification", {
15674-
value: () => {
15675-
},
15682+
value: wrappedNotification,
1567615683
writable: true,
1567715684
configurable: true,
1567815685
enumerable: false
1567915686
});
15680-
this.defineProperty(window.Notification, "requestPermission", {
15681-
value: () => {
15682-
return Promise.resolve("denied");
15683-
},
15684-
writable: true,
15685-
configurable: true,
15686-
enumerable: true
15687-
});
1568815687
this.defineProperty(window.Notification, "permission", {
15689-
get: () => "denied",
15688+
value: "denied",
15689+
writable: false,
1569015690
configurable: true,
15691-
enumerable: false
15691+
enumerable: true
1569215692
});
1569315693
this.defineProperty(window.Notification, "maxActions", {
1569415694
get: () => 2,
1569515695
configurable: true,
1569615696
enumerable: true
1569715697
});
15698+
const requestPermissionFunc = function requestPermission() {
15699+
return Promise.resolve("denied");
15700+
};
15701+
const wrappedRequestPermission = wrapToString(
15702+
requestPermissionFunc,
15703+
requestPermissionFunc,
15704+
"function requestPermission() { [native code] }"
15705+
);
15706+
this.defineProperty(window.Notification, "requestPermission", {
15707+
value: wrappedRequestPermission,
15708+
writable: true,
15709+
configurable: true,
15710+
enumerable: true
15711+
});
1569815712
}
1569915713
cleanIframeValue() {
1570015714
function cleanValueData(val) {

0 commit comments

Comments
 (0)