dyork / dom.js Goto Github PK
View Code? Open in Web Editor NEWThis project forked from andreasgal/dom.js
Self-hosted JavaScript implementation of a WebIDL-compliant HTML5 DOM.
License: BSD 2-Clause "Simplified" License
This project forked from andreasgal/dom.js
Self-hosted JavaScript implementation of a WebIDL-compliant HTML5 DOM.
License: BSD 2-Clause "Simplified" License
The goal of this project is to evaluate whether it is feasible to implement a WebIDL-compliant HTML5 DOM in JavaScript. While a couple other self-hosted JavaScript DOM implementations exist, none of them are WebIDL-compliant (i.e. properties don't live on the prototype but directly on each node, for example). Also, all other implementations do not provide proper encapsulation. The details of the implementation leak through the API. The code uses ES5, Proxies and WeakMaps as well as Spidermonkey features such as const, let and destructuring assignment. It should run in Firefox 6. The Makefile generates dom.js from many smaller files in the src/ directory. dom.js includes all of the smaller files within one large closure so the variables and constants that appear to be global do not, in fact, leak into the global scope. The src/impl/ directory contains an implementation of the DOM using plain JavaScript objects. By itself, this is not a conforming implementation because its internal properties are visible. The src/idl/ directory implements WebIDL-compliant DOM interfaces on top of the implementation objects. Each interface object has a corresponding implementation object, and a WeakMap maintains the mapping from interfaces to implementations so that the interface object does not require a property that refers to the implementation. Installing ====== Get a copy of the dom.js source. Install node.js http://nodejs.org/#download Install spidermonkey https://developer.mozilla.org/En/SpiderMonkey/Build_Documentation Building ====== 1. Run "git submodule init". 2. Run "git submodule update". This clones the CoverMonkey and webidl.js repos that the dom.js build and tests depends on. 3. Run "make". This assembles the dom.js, src/domcore.js, and src/htmlelts.js files from the other source files in the project. Testing ====== Run either make test-summary or make test-detailed. The JS_PATH environment variable should be set to the directory that contains the spidermonkey "js" executable, and the JSTESTS_PATH environment variable should be set to the directory that contains jstests.py. Example: JS_PATH=~/Code/mozilla-central/js/src/build-release JSTESTS_PATH=~/Code/mozilla-central/js/src/tests make test-detailed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.