WHAT IS A SOFTWARE WRAPPER CODE
In most cases, however, this gets automated by the code builders replacing Objects and functions provided by the wrappers look as much native as possible (on Chromium, too). Prepare an object/function created in Firefox's sandboxed content script environment to be consumed/called from the page context, and to make replacements for native WrapHelper.forPage(obj) - it's mostly used internally and transparently by code_builder.js,īut may be useful to very complex proxies in edge cases needing to explicitly.This allows spoofing some native objects data in a less detectable / fingerprintable way as if they were returned by getters on the prototype chain, WrapHelper.overlay(obj, data) - Proxies the prototype of the obj object in order to return the properties of the data objectĪs if they were native properties (e.g.Warning: namespacing is not enforced and up to the wrapper implementor, but obviously recommended. to coordinate behavior between related parts of the same API requiring multiple wrappings)īy attaching its own data objects as properties. ( function () - a "bare" JavaScript object which a wrapper can use to share information with other wrappers Once you are set with the file name for your wrappers, you can start coding. Peter Snyder, Cynthia Taylor, and Chris Kanich, “ Most Websites Don’t Need to Vibrate: A Cost–Benefit Approach to Improving Browser Security,” in Proceedings of the 2017 ACM Conference on Computer and Communications Security, 2017. JShelter adopted the naming conventions of the Web API Manager. See the wrapper specification section for the properties of the wrapper objects. See the naming conventions for details on the XYZ part of the name. wrappingS-XYZ are files dealing with APIs introduced by specific web or ECMA standard.The module also provides common functions used by the wrappers, e.g.Do not modify the build_wrapping_code variable directly, use add_wrappers instead. The keys are referenced by the levels wrapper list. build_wrapping_code contains all the registered wrappers.ends with a call of add_wrappers(list_of_all_wrappers_defined_by_the_module). Hence, a typical module with wrappers of a web standard APIS. add_wrappers() has to be provided with all the wrappers.wrapping.js provides main facilities for interacting with specific wrappers:.a correctly written wrapper creates a modified function but wrapper.toString() returns the original string. This approach also helps to automatically modify toString conversions of the wrapped APIs, i.e. As some of the code is very similar for each wrapper, we use a unified approach to describe wrappers. The primary focus of jShelter is to provide security and privacy oriented wrappers of JavaScript APIs.