You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Netflix uses Object.defineProperty to define functions related to advertisement 1, it seems that new scriptlet setting inbound and outbound of Object.defineProperty and Object.defineProperties is required for the advanced filtering quality.
Also, bundlers and transpilers like Babel often use Object.defineProperty to emulate certain ES6+ features in a way that's compatible with older JavaScript environments as GitHub Copilot said.
NonFunctionalBoolean — Non-functional comparative text like Object.entries.name === 'entries'. _Inbound (inbound argument for the mocked functions) and _Outbound (Reflect.apply result of the object.defineproperty or object.defineproperties) should be revealed in the non-functional comparative text to compare.
ReturnAs — Like value argument of set-constant scriptlet, a returned value instead of the actual outbound result.
FilledWith — (boolean) If it is true and the actual outbound result is Object, all entries of the object will be filled with ReturnAs. Otherwise, FilledWith argument will be ignored.
Usage with no arguments will log inbound arguments and outbound result to browser console.
piquark6046
changed the title
Add new scriptlet — 'trusted-prune-object-defineproperty'
Add new scriptlet — 'trusted-set-object-defineproperty'
Apr 4, 2024
Introduction
Since Netflix uses
Object.defineProperty
to define functions related to advertisement 1, it seems that new scriptlet setting inbound and outbound ofObject.defineProperty
andObject.defineProperties
is required for the advanced filtering quality.Also, bundlers and transpilers like Babel often use
Object.defineProperty
to emulate certain ES6+ features in a way that's compatible with older JavaScript environments as GitHub Copilot said.Screenshot
Proposed Syntax
NonFunctionalBoolean
— Non-functional comparative text likeObject.entries.name === 'entries'
._Inbound
(inbound argument for the mocked functions) and_Outbound
(Reflect.apply
result of theobject.defineproperty
orobject.defineproperties
) should be revealed in the non-functional comparative text to compare.ReturnAs
— Likevalue
argument ofset-constant
scriptlet, a returned value instead of the actual outbound result.FilledWith
— (boolean) If it is true and the actual outbound result isObject
, all entries of the object will be filled withReturnAs
. Otherwise,FilledWith
argument will be ignored.Usage with no arguments will log inbound arguments and outbound result to browser console.
Footnotes
https://github.com/AdguardTeam/AdguardFilters/pull/135052 ↩
The text was updated successfully, but these errors were encountered: