background preloader

Javascript

Facebook Twitter

Douglas Crockford's Javascript. Rhino. Douglas Crockford's Javascript. JSLint,The JavaScript Code Quality Tool.

Temas

Can I use... Support tables for HTML5, CSS3, etc. # JSON parsing - Other Method of converting JavaScript objects to JSON strings and JSON back to objects using JSON.stringify() and JSON.parse() # Cross-document messaging - Working Draft Method of sending information from a page on one domain to a page on a different one (using postMessage) Sub-features: Channel messaging Partial support in IE8-9 refers to only working in frames/iframes (not other tabs/windows) . # Web Storage - name/value pairs - Recommendation Method of storing data locally like cookies, but for larger amounts of data (sessionStorage and localStorage, used to fall under HTML5). # Hashchange event - Candidate Recommendation Event triggered in JavaScript when the URL's hash has changed (for example: page.html#foo to page.html#bar) # Cross-Origin Resource Sharing - Recommendation Method of performing XMLHttpRequests across domains Supported somewhat in IE8 and IE9 using the XDomainRequest object (but has limitations) # getComputedStyle - Recommendation No known issues # Geolocation - Other.

10 Communication. 9 Communication 9.1 The MessageEvent interfaces Messages in server-sent events, Web sockets, cross-document messaging, channel messaging, and broadcast channels use the MessageEvent interface for their message events: [Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=Window,Worker] interface MessageEvent : Event { readonly attribute any data; readonly attribute DOMString origin; readonly attribute DOMString lastEventId; readonly attribute DOMString channel; readonly attribute (WindowProxy or MessagePort)? Source; readonly attribute MessagePort[]?

MessageEventInit : EventInit { any data; DOMString origin; DOMString lastEventId; DOMString channel; (WindowProxy or MessagePort)? . data Returns the data of the message. . origin Returns the origin of the message, for server-sent events and cross-document messaging. . lastEventId Returns the last event ID string, for server-sent events. . channel Returns the channel ID, for broadcast channels. . source . ports The data origin source. 9 Web workers. 10 Web workers 10.1 Introduction 10.1.1 Scope This section is non-normative. This specification defines an API for running scripts in the background independently of any user interface scripts.

This allows for long-running scripts that are not interrupted by scripts that respond to clicks or other user interactions, and allows long tasks to be executed without yielding to keep the page responsive. Workers (as these background scripts are called herein) are relatively heavy-weight, and are not intended to be used in large numbers.

Generally, workers are expected to be long-lived, have a high start-up performance cost, and a high per-instance memory cost. 10.1.2 Examples There are a variety of uses that workers can be put to. 10.1.2.1 A background number-crunching worker The simplest use of workers is for performing a computationally expensive task without interrupting the user interface. The main page is as follows: <! The worker itself is as follows: View this example online. Here is the HTML page: ECMAScript 5 compatibility table. ECMAScript Language Specification - ECMA-262 Edition 5.1. JavaScript. JavaScript (JS) is a lightweight interpreted (or just-in-time compiled) programming language with first-class functions.

While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. JavaScript's dynamic capabilities include runtime object construction, variable parameter lists, function variables, dynamic script creation (via eval), object introspection (via for...in and Object utilities), and source-code recovery (JavaScript functions store their source text and can be retrieved through toString()).

This section is dedicated to the JavaScript language itself, and not the parts that are specific to Web pages or other host environments. Looking to become a front-end web developer? Get started. Language – test262. ECMAScript Language Specification - ECMA-262 Edition 5.1.

Typescript

ECMAScript 5 compatibility table. JavaScript Kit- Your comprehensive JavaScript, DHTML, CSS, and Ajax stop. Blogs & magazines. Tools. Patterns. Frameworks & libraries & tools. Learning. How-tos. Json. Microjs: Fantastic Micro-Frameworks and Micro-Libraries for Fun and Profit! Javascriptweekly.com/archive/