Platform for Measurement of Javascript Apis Usage on a Web

Total Page:16

File Type:pdf, Size:1020Kb

Platform for Measurement of Javascript Apis Usage on a Web http://excel.fit.vutbr.cz Platform for measurement of JavaScript APIs usage on a web Marek Schauer* Abstract The world wide web is a complex environment. Web pages can access many APIs ranging from text formatting to access to nearby Bluetooth devices. While many APIs are used for legitimate purposes, some are misused to track and identify their users without their knowledge. In this paper, we propose a methodology to measure the usage of JavaScript APIs on the public web. The methodology consists of an automated visit of several thousand websites and intercepting JavaScript calls performed by the pages. We also provide a design and architecture of a measurement platform that can be used for an automated visit of a list of websites. The proposed platform is based on OpenWPM. The browser is instrumented by OpenWPM and a customized Web API Manager extension is responsible for capturing JavaScript API calls. Keywords: JavaScript — ECMAScript — Web API — API usage — Web measurement — Browser — OpenWPM Supplementary Material: N/A *xschau00@fit.vutbr.cz, Faculty of Information Technology, Brno University of Technology 1. Introduction environment, which in addition to the base set of EC- MAScript provides many additional APIs specified by Web browsers offer a wide range of possibilities. A reg- other organizations (e.g. W3C or WHATWG). These ular user can say that it is just a place for viewing web standards are often called Web APIs and in this article, pages, but under the hood, web browsers provide an we will call these Web APIs as JavaScript APIs. actual bridge between a viewed page and the host op- erating system. A web browser allows a web page Many JavaScript APIs are used in a manner that to access information like values from sensors, infor- has nothing in common with the original purpose of the mation about battery status, installed fonts, and much API; this paper is concerned mainly with user tracking more. Internet industry often takes advantage of such and fingerprinting. This behavior of websites usually a wide range of information provided by web browsers includes using many distinct APIs, that provide some and there is quite a high percentage of pages that col- kind of specific information [1, 2]. For example Bat- lect a fingerprint from users and try to identify them tery Status API implementation on Mozilla Firefox to show them relevant content [1]. These practices are revealed very precise value allowing the trackers to quite common and a large part of them is implemented identify the user for a period of time [3, 4]. Because using the JavaScript language. the Battery Status API was used heavily for fingerprint- ing, it has been removed from Mozilla Firefox in 2017. JavaScript is a language that can be run in many Other examples of JavaScript APIs that are used often environments, while the most well-known one is prob- for fingerprinting are Canvas API [4], Audio API [2], ably the web browser. Nowadays, there are solutions Permissions API [1] or APIs for working with users that provide JavaScript to the servers too, such as device sensors [5]. NodeJS. All these environments supply the basic set of ECMAScript language specified by the ECMA organi- In our work, we aim to measure the JavaScript zation. In this article, we will focus on the web browser APIs usage by popular websites. In this article, we 130 The main idea of the measurement is to visit sev- 120 Internet Explorer 110 Firefox eral thousands of the most famous pages on the internet 100 Opera 90 and intercept as many JavaScript calls as possible. 80 Google Chrome 70 Microsoft Edge Visiting websites will be performed through the 60 Safari 50 commonly used web browser, specifically Mozilla Fire- 40 30 fox. This web browser will be enriched by an exten- 20 10 0 sion, that can intercept and log the JavaScript calls. To maximize the amount of intercepted JavaScript Amount of implemented APIs Amount implementedof calls we will visit not only the landing page but also the 1.1.2005 1.1.2006 1.1.2007 1.1.2008 1.1.2009 1.1.2010 1.1.2011 1.1.2012 1.1.2013 1.1.2014 1.1.2015 1.1.2016 1.1.2017 1.1.2018 1.1.2019 1.1.2020 1.1.2021 Date of new browser version release subset of subpages of each website. From the landing page, we will extract three links that point to a subpage Figure 1. Progress of Web APIs amount implemented of a given page. From each of these three subpages, in distinct browsers in time. we will get another three subpage links resulting in up to 13 pages of a given website being visited. This present core technologies to accomplish these measure- amount of pages should be high enough to catch the ments. The stack of technologies is based on Open- most of JavaScript calls. WPM1 enriched by a browser extension, that allows To visit several thousands of websites we need us to intercept JavaScript calls of different APIs. This to assemble a list of website addresses, that will be browser extension is based on Proxy objects. Further visited when performing our measurements. In this details about core technologies are given in Section3. area, we will take advantage of previous work of other Our work is based on work of Peter Snyders et researchers and we will use the Tranco list. In the al. [6] in 2016. Since then many new APIs were research conducted by Snyders, the Alexa Top Sites specified and implemented in web browsers. Progress list provided by Amazon was used. Our decision of of APIs amount implemented in several most famous choosing the Tranco instead of the Alexa Top Sites is web browsers is illustrated in Figure1. Figure is based explained in subsection 3.4. on data from Can I use website2. To give a web page a chance to perform all the In our work we will reproduce Snyders measure- JavaScript calls as it would be visited by a real user, we ments with a focus on new JavaScript APIs. More will wait and intercept JavaScript calls for 30 seconds details about results of Snyders research are given in on each page. section 3.1. In this paper, we propose the methodology Results of our measurements should also provide of our own measurements in section2. Further, in information about the JavaScript APIs, that were prob- subsections 3.2, 3.3 and 3.4 we describe technologies ably used in a manner, that is not necessary for a page that will be used for measurements. Finally, in sec- to be working and is very likely used in a way, that tion4 we describe our contribution and explain how the user would not find useful. To achieve this, we we customized and adjusted these formerly mentioned will run our measurements on every page in two dif- technologies to perform measurements. ferent modes. At first, we will visit the page using the common browser, which is not extended by any- thing special except the extension used for intercepting 2. Methodology proposal JavaScript calls and logging them. Then we will visit This section describes the methodology that is planned the same page using a browser complemented by an to be used when the actual measurements will be per- extension for blocking ads. The difference between formed. This methodology is based on the methodol- logged data will show us which APIs were blocked ogy used in previous research conducted by Peter Sny- by the ad blocker and which APIs were left out with- ders [6]. Building a methodology on top of a method- out blocking. As an extension for the ad-blocking, ology used in previous research can be profitable in we picked a generic version of well known Ghostery two ways. First, the methodology is already validated extension for Mozilla Firefox. by the authors of the mentioned study. Second, using a methodology that is very close to the original one 3. Existing research and state of the art can show us a difference in the usage of the JavaScript This section provides key insights into the existing APIs between 2016 and 2021. research in the field of JavaScript usage on the web. 1https://github.com/mozilla/OpenWPM Further, in the following subsections, we describe the 2https://caniuse.com/ state-of-the-art tools and technologies that we plan to use later when the measurements will be actually :Document taken. 3.1 JavaScript usage on the web document.querySelector(selectors) The Snyders study suggests that some of the JavaScript APIs are extremely popular and they are used on more than 90% of measured pages (e.g. a well known Document.createElement method from DOM Element | null API). On the other hand, there are many APIs that are used by a minority of measured pages. That being said, almost 50% of JavaScript APIs implemented in Figure 2. Sequence diagram of querySelector the browser at the time were not used by any of the method called directly measured pages. :Proxy :LogsInterface :Document The study also suggests that there is no direct con- nection between the implementation date of a given JavaScript API in the browser (or by its specification document.querySelector(selectors) date by some of the specifications vendors) and its log() popularity in using by websites. Concretely, there are some old JavaScript APIs, such as XMLHttpRequest, querySelector(selectors) that are still very popular. However, there are also quite Element | null new JavaScript APIs, that are used very frequently (i.e., Element | null Selectors API Level 1). The conducted study also measured the pages in two ways - with the ad blocker and without any ad Figure 3.
Recommended publications
  • Web-Enabled DDS Version 1.0
    Date: July 2016 Web-Enabled DDS Version 1.0 __________________________________________________ OMG Document Number: formal/2016-03-01 Standard document URL: http://www.omg.org/spec/DDS-WEB Machine Consumable File(s): Normative: http://www.omg.org/spec/DDS-WEB/20150901/webdds_rest1.xsd http://www.omg.org/spec/DDS-WEB/20150901/webdds_websockets1.xsd http://www.omg.org/spec/DDS-WEB/20131122/webdds_soap1_types.xsd http://www.omg.org/spec/DDS-WEB/20131122/webdds_soap1.wsdl http://www.omg.org/spec/DDS-WEB/20131122/webdds_soap1_notify.wsdl Non-normative: http://www.omg.org/spec/DDS-WEB/20150901/webdds_rest1_example.xml http://www.omg.org/spec/DDS-WEB/20150901/webdds_pim_model_v1.eap _______________________________________________ Copyright © 2013, eProsima Copyright © 2016, Object Management Group, Inc. (OMG) Copyright © 2013, Real-Time Innovations, Inc. (RTI) Copyright © 2013, THALES USE OF SPECIFICATION - TERMS, CONDITIONS & NOTICES The material in this document details an Object Management Group specification in accordance with the terms, condi- tions and notices set forth below. This document does not represent a commitment to implement any portion of this speci- fication in any company's products. The information contained in this document is subject to change without notice. LICENSES The companies listed above have granted to the Object Management Group, Inc. (OMG) a nonexclusive, royalty-free, paid up, worldwide license to copy and distribute this document and to modify this document and distribute copies of the modified version. Each of the copyright holders listed above has agreed that no person shall be deemed to have infringed the copyright in the included material of any such copyright holder by reason of having used the specification set forth herein or having conformed any computer software to the specification.
    [Show full text]
  • Fido-Uaf-Client-Api-Transport-V1.0-Ps
    FIDO UAF Application API and Transport Binding Specification v1.0 FIDO Alliance Proposed Standard 08 December 2014 This version: https://fidoalliance.org/specs/fido-uaf-v1.0-ps-20141208/fido-uaf-client-api-transport-v1.0-ps-20141208.html Previous version: https://fidoalliance.org/specs/fido-uaf-client-api-transport-v1.0-rd-20141008.pdf Editor: Brad Hill, PayPal, Inc. Contributors: Davit Baghdasaryan, Nok Nok Labs, Inc. Bill Blanke, Nok Nok Labs, Inc. Dr. Rolf Lindemann, Nok Nok Labs, Inc. Jeff Hodges, PayPal, Inc. The English version of this specification is the only normative version. Non-normative translations may also be available. Copyright © 2013-2014 FIDO Alliance All Rights Reserved. Abstract Describes APIs and an interoperability profile for client applications to utilize FIDO UAF. This includes methods of communicating with a FIDO UAF Client for both Web platform and Android applications, transport requirements, and an HTTPS interoperability profile for sending FIDO UAF messages to a compatible server. Status of This Document This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current FIDO Alliance publications and the latest revision of this technical report can be found in the FIDO Alliance specifications index at https://www.fidoalliance.org/specifications/. This document was published by the FIDO Alliance as a Proposed Standard. If you wish to make comments regarding this document, please Contact Us. All comments are welcome. Implementation of certain elements of this Specification may require licenses under third party intellectual property rights, including without limitation, patent rights.
    [Show full text]
  • Tr 126 981 V15.0.0 (2018-07)
    ETSI TR 126 981 V15.0.0 (2018-07) TECHNICAL REPORT LTE; MBMS Extensions for Provisioning and Content Ingestion (3GPP TR 26.981 version 15.0.0 Release 15) 3GPP TR 26.981 version 15.0.0 Release 15 1 ETSI TR 126 981 V15.0.0 (2018-07) Reference RTR/TSGS-0426981vf00 Keywords LTE ETSI 650 Route des Lucioles F-06921 Sophia Antipolis Cedex - FRANCE Tel.: +33 4 92 94 42 00 Fax: +33 4 93 65 47 16 Siret N° 348 623 562 00017 - NAF 742 C Association à but non lucratif enregistrée à la Sous-Préfecture de Grasse (06) N° 7803/88 Important notice The present document can be downloaded from: http://www.etsi.org/standards-search The present document may be made available in electronic versions and/or in print. The content of any electronic and/or print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat. Users of the present document should be aware that the document may be subject to revision or change of status. Information on the current status of this and other ETSI documents is available at https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx If you find errors in the present document, please send your comment to one of the following services: https://portal.etsi.org/People/CommiteeSupportStaff.aspx Copyright Notification No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm except as authorized by written permission of ETSI.
    [Show full text]
  • A Webrtc Based Platform for Synchronous Online Collaboration and Screen Casting
    A WEBRTC BASED PLATFORM FOR SYNCHRONOUS ONLINE COLLABORATION AND SCREEN CASTING by NIKOLAOS PINIKAS Master in Informatics and Multimedia, Department of Informatics Engineering, School of Applied Technology, Technological Educational Institute of Crete, 2016 A THESIS submitted in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE IN INFORMATICS & MULTIMEDIA DEPARTMENT OF INFORMATICS ENGINEERING SCHOOL OF APPLIED TECHNOLOGY TECHNOLOGICAL EDUCATIONAL INSTITUTE OF CRETE 2016 Approved by: Assistant Professor Dr. Spyros Panagiotakis Copyright NIKOLAOS PINIKAS 2 0 16 This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/. All included code is licensed under the MIT License. 2 “WebRTC is not a standard. It’s a movement.” -Tsahi Levent-Levi 3 Abstract WebRTC is a project that was released by Google in 2011 to allow browser- to-browser communication. It includes voice, video and data without the use of plugins. The mission of WebRTC according to Google is to enable rich, high quality, RTC applications to be developed for the browser, mobile platforms, and Internet of Things (IoT) devices, and allow them all to communicate via a common set of protocols. In this thesis we employ the capabilities of the WebRTC APIs to implement a platform for synchronous online collaboration, screen casting and simultaneous multimedia communication by utilizing the WebRTC data and media streams. Collaborative software is defined as “a software that supports intentional group processes”. Collaborative solutions include a wide range of tools. On the Web these tools can be part of what is known as a “Client-Portal” and can include discussions, white boards, media and file exchanging etc.
    [Show full text]
  • W3C TAG Perspectives
    The future of applications: W3C TAG perspectives Henry S. Thompson School of Informatics University of Edinburgh W3C Technical Architecture Group 28 March 2011 * help? contents? restart? Copyright (C) 2011 Henry S. Thompson slide 1/23 The World Wide Web Consortium Founded by Tim Berners-Lee to sustain the value of the Web for everyone and "lead the Web to its full potential" Hosted by MIT in US, Keio University in Japan and ERCIM in Europe ~60 employees, about half working remotely Over 300 members: organisations and companies Recently awarded substantial support from ISOC Standards work carried out by Working Groups made up of member representatives and invited experts 100s of existing Recommendations, dozens in progress from >50 WGs Mostly 'horizontal' technologies HTML (itself, Forms, CSS) XML (itself, XSLT, Schema, Query, Processing Model, Linking) * help? contents? restart? Copyright (C) 2011 Henry S. Thompson slide 2/23 Multimedia (PNG, SVG, SMIL, VoiceXML) Mobile (Mobile Web Initiative ('one web'), Mobile CSS, Geospatial (!)) Semantic Web (RDF, OWL, Rules) Accessibility Internationalisation * help? contents? restart? Copyright (C) 2011 Henry S. Thompson slide 2/23 The Technical Architecture Group of the W3C Originally the Director (Tim B-L) was responsible for maintaining consistency across activities As the Consortium grew and the scope of its activities enlarged, this task became impossible The TAG was established eight years ago to pick up and broaden this task Identify and promote core principles of Web Architecture Look backwards at what has made the Web succeed And forwards to what must be done to protect that success While embracing as much as possible that emerges And, perhaps most importantly for tonight's panel * help? contents? restart? Copyright (C) 2011 Henry S.
    [Show full text]
  • Enabling Web–Based SBML Tools
    bioRxiv preprint doi: https://doi.org/10.1101/594804; this version posted April 3, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made available under aCC-BY 4.0 International license. libsbmljs — Enabling Web–Based SBML Tools J Kyle Medley1, , Joseph Hellerstein2, and Herbert M Sauro1 1Department of Bioengineering, University of Washington, Seattle, Washington, 98195-5061, United States of America 2eScience Institute, University of Washington, Seattle, Washington, 98195-5061, United States of America The SBML standard is used in a number of online reposito- the Web. Furthermore, the Web is becoming a major plat- ries for storing systems biology models, yet there is currently form for systems biology tools. With the advent of Web ap- no Web–capable JavaScript library that can read and write the plications for pathway visualization (Escher (9)), gene inter- SBML format. We present libsbmljs, a JavaScript / WebAssem- action network visualization (Cytoscape.js (10)), expression bly library for Node.js and the Web with full support for all analysis (ZBIT (11)) and integrated design systems (Caffeine SBML extensions. Our library is an enabling technology for on- (12)), the need for a JavaScript library which can read and line SBML editors, model–building tools, and web–based simu- write SBML becomes imperative. lators. We provide NPM packages, an extensive set of examples, JavaScript API documentation, and an online demo that allows We present libsbmljs, a feature–complete JavaScript library users to read and validate the SBML content of any model in for reading and writing SBML in the browser and Node.js.
    [Show full text]
  • A Study of Internet of Things Real-Time Data Updating Based On
    Invited Paper A Study of Internet of Things Real-time Data Updating Based on WebSocket Shoulin Wei*, Konglin Yu, Wei Dai, Bo Liang, Xiaoli Zhang Computer Technology Application Key Lab of Yunnan Province, Kunming University of Science and Technology, Kunming, 650500, China ABSTRACT The Internet of Things (IoT) is gradually entering the industrial stage. Web applications in IoT such as monitoring, instant messaging, real-time quote system changes need to be transmitted in real-time mode to client without client constantly refreshing and sending the request. These applications often need to be as fast as possible and provide nearly real-time components. Real-time data updating is becoming the core part of application layer visualization technology in IoT. With support of data push in server-side, running state of "Things" in IoT could be displayed in real-time mode. This paper discusses several current real-time data updating method and explores the advantages and disadvantages of each method. We explore the use of WebSocket in a new approach for real-time data updating in IoT, since WebSocket provides low delay, low network throughput solutions for full-duplex communication. Keywords: WebSocket, Real-time data updating, Internet of Things, HTML5 1. INTRODUCTION The Internet of Things (IoT) is a novel paradigm that is rapidly gaining ground in the scenario of modern wireless telecommunications [1]. With the development of sensor and the gradual maturity of sensing technology, Internet of Things has been widely applied to industrial process monitoring, production chain management, material supply chain management, product quality control, equipment maintenance, inspection and production safety with energy management and other processes of production [2].
    [Show full text]
  • Dom Objects in Javascript Examples
    Dom Objects In Javascript Examples Is Toby armigeral or Martian after outflowing Tobiah standardizing so meanwhile? Keefe often wambled intreatunprincely scatteredly when drab as exterminable Olivier configures Reilly glacially resolve andapproximately discolors her and Cobden. trivialised Bart unblamably. is destroyed and The first and second methods are more suited to an HTML environment. For third while the DOM uses IDL attributes in the definition of. How and you manipulate a dom? In flutter example we have was important elements that you're gonna see a lot. What extra the Document Object Model. URL is wit and passenger request is successful. Url of all about some programming language and by an object to the library and can also joined dzone community can eradicate those in javascript dom objects in examples that item. The event listener can choose to prevent the action from being run. The root go a tree is through object participating in that will whose parent is. Anne van Kesteren; et al. The long form is only used in a few odd cases when your page is loading several libraries, both of which use the dollar sign. This example we will do so? Js Bind and To DOM Element Basic Example In our example current will use D3js to bind stuff to DOM elements of a basic webpage Start with. Chrome because these objects in javascript dom object models. This example of objects borrow from exertnal stylesheets on any, and examples page, and prevention techniques, then children are. How-To will taint the JavaScript programming language in its examples.
    [Show full text]
  • Righting Web Development
    University of Massachusetts Amherst ScholarWorks@UMass Amherst Doctoral Dissertations Dissertations and Theses October 2018 Righting Web Development John Vilk University of Massachusetts Amherst Follow this and additional works at: https://scholarworks.umass.edu/dissertations_2 Part of the OS and Networks Commons, and the Programming Languages and Compilers Commons Recommended Citation Vilk, John, "Righting Web Development" (2018). Doctoral Dissertations. 1405. https://doi.org/10.7275/12765546 https://scholarworks.umass.edu/dissertations_2/1405 This Open Access Dissertation is brought to you for free and open access by the Dissertations and Theses at ScholarWorks@UMass Amherst. It has been accepted for inclusion in Doctoral Dissertations by an authorized administrator of ScholarWorks@UMass Amherst. For more information, please contact [email protected]. RIGHTING WEB DEVELOPMENT A Dissertation Presented by JOHN VILK Submitted to the Graduate School of the University of Massachusetts Amherst in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY September 2018 College of Information and Computer Sciences c Copyright by John Vilk 2018 All Rights Reserved RIGHTING WEB DEVELOPMENT A Dissertation Presented by JOHN VILK Approved as to style and content by: Emery D. Berger, Chair Yuriy Brun, Member Arjun Guha, Member David Irwin, Member James Mickens, Member James Allan, Chair of Faculty College of Information and Computer Sciences DEDICATION For my mother, who has always believed in me and pushed me to do my best. ACKNOWLEDGMENTS First, I would like to thank my advisor, Emery Berger, for his unwavering support and invaluable guidance over the past seven years. Your advice has had a considerable impact on how I conduct research, present ideas, and measure success.
    [Show full text]
  • Paper Presents an Architecture for up Read-Only Access at the Cost of Slower Update Queries
    An architecture for the Web of Things Dave Raggett W3C/ERCIM 2004, route des Lucioles Sophia Antipolis - France [email protected] ABSTRACT end servers that handle the HTTP client requests can spread the The real World consists of physical things that computer software computational load across multiple back-end servers. can interact with through sensors and actuators. This can be com- Cloud computing refers to the means to fulfil compute or storage bined with rich descriptions, e.g. of devices, people, places and requirements by connecting a large number of computers. These events. There is a huge potential for services, and most of the work computers are often hosted by third parties as a service at a lower to date has focused on communication technologies for the Internet cost that it would be to provision these yourself. Virtualization of Things. It is now timely for an increased focus on how to create allows a single physical computer to be shared as a number of services, and the importance of standards for realizing the potential. virtual computers. This gives users the ability to install and configure The Web of Things extends the Semantic Web into the real World their own software as needed. Scalable solutions for data storage for an open ecosystem of value added services based upon physi- involve mechanisms for replication and synchronization. If most cal sensors, actuators and tags, together with rich descriptions of data queries are read-only, the mechanisms can be designed to speed physical and abstract things. This paper presents an architecture for up read-only access at the cost of slower update queries.
    [Show full text]
  • Libsbmljs — Enabling Web–Based SBML Tools
    bioRxiv preprint doi: https://doi.org/10.1101/594804; this version posted June 5, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made available under aCC-BY 4.0 International license. libsbmljs — Enabling Web–Based SBML Tools J Kyle Medley1, , Joseph Hellerstein2, and Herbert M Sauro1 1Department of Bioengineering, University of Washington, Seattle, Washington, 98195-5061, United States of America 2eScience Institute, University of Washington, Seattle, Washington, 98195-5061, United States of America The SBML standard is used in a number of online reposito- ing BioModels (5, 6) and JWS Online (7, 8), which host ries for storing systems biology models, yet there is currently primarily kinetic reaction network models, and BiGG Mod- no Web–capable JavaScript library that can read and write els cite (9), which hosts primarily genome–scale constraint– the SBML format. This is a severe limitation since the Web based models. has become a universal means of software distribution, and the Despite this wide–spread adoption and inclusion in several graphical capabilities of modern web browsers offer a power- online repositories, no feature–complete JavaScript library ful means for building rich, interactive applications. Also, there is a growing developer population specialized in web technolo- currently exists that can run in a web browser (a native gies that is poised to take advantage of the universality of the Node.js module exists, but cannot run in the browser). Thus, web to build the next generation of tools in systems biology these online repositories must rely on server–side processing and other fields.
    [Show full text]
  • Webassembly: Status & Web IDL Bindings
    WebAssembly: Status & Web IDL Bindings W3C Games Workshop - June, 2019 Luke Wagner Based on joint Mozilla/Google presentation to WebAssembly CG last week (link) WebAssembly Status ● 2017: "MVP" ships in 4 browsers \o/ ● Immediately continued work on a pipeline of proposed additions ● Based on TC39 stages process ● Post-MVP Roadmap ● https://github.com/webassembly/proposals * Bindings Proposal History ● 2017 - Ship the WebAssembly "MVP" ○ Only 4 value types: i32, i64, f32, f64 ○ How can WebAssembly call Web APIs? ● 2017 - Take 1: "Host Bindings" (CG pres, TPAC pres) ○ All host values go in wasm tables (wasm linear memory requires exposing raw bits) ○ Automatically convert between table indices and host values at the interface ○ Increasingly awkward as we worked through use cases; also not efficient ● 2018 - Reference Types (CG pres, explainer) ○ Subtype hierarchy: anyref, funcref, ref T (where T = func(X→Y), struct{x:A,y:B}, array(T), ...) ○ Gives wasm first-class host values ● 2019 - Take 2: "Web IDL Bindings" (CG pres, explainer) ○ Let's focus just on efficiently binding to Web IDL, building on reference types ○ "Efficiently" means eliminating copies, garbage, auxiliary calls ("Host Bindings" didn't) ○ "Web IDL" allows us to focus on Web IDL's types, avoid Hard(TM) problems In the MVP, ... ... when calling wasm ... when calling a Web API Web API function Web IDL values Web IDL spec: ECMAScript Binding wasm module JS glue code function export JS values wasm JS API spec results results params params function import function import wasm module function export function export results results wasm JS API spec params JS glue code params function import JS values wasm module Web IDL spec: ECMAScript Binding Web IDL values Web API callback With the proposal..
    [Show full text]