background preloader

ECMAScript 5 Strict Mode, JSON, and More

ECMAScript 5 Strict Mode, JSON, and More
Previously I analyzed ECMAScript 5’s Object and Property system. This is a huge new aspect of the language and deserved its special consideration. There are a number of other new features and APIs that need attention, as well. The largest of which are Strict Mode and native JSON support. Strict Mode Strict Mode is a new feature in ECMAScript 5 that allows you to place a program, or a function, in a “strict” operating context. Since ECMAScript 5 is backwards-compatible with ECMAScript 3, all of the “features” that were in ECMAScript 3 that were “deprecated” are just disabled (or throw errors) in strict mode, instead. Strict mode helps out in a couple ways: It catches some common coding bloopers, throwing exceptions.It prevents, or throws errors, when relatively “unsafe” actions are taken (such as gaining access to the global object).It disables features that are confusing or poorly thought out. Most of the information about strict mode can be found in the ES5 specification [PDF] on page #235.

Apps Platform This document describes what Gmail contextual gadgets are, how to write them, how to install them, and how to diagnose and fix some common issues. Gmail contextual gadgets can be listed for sale in the Google Apps Marketplace or used within in-house applications installed through the Google Apps console. Prerequisites This document assumes: You know what a gadget is and have a rough idea how to write one (see Getting Started guide for the gadgets.* API).You can post files to public Internet. If you do not have web hosting, then you can post gadgets with the Google Gadget Editor. What is a Gmail contextual gadget? A Gmail contextual gadget is a gadget that is triggered by clues in Gmail, such as the contents of Subject lines and email messages. There are two development and deployment models: Develop a Gmail contextual gadget for use within a single organization's Google Apps domains (an in-house application).List the gadget for sale on the Google Apps Marketplace. Extractor Gadget spec <? <! <! <?

10 Impressive JavaScript Animation Frameworks Complex and slick JavaScript-based animation has been made easier with the emergence of frameworks and libraries that give developers the ability to create stunning and eye-grabbing animation and transition effects that make it easy these complex tasks. In this article, you will read about the top 10 JavaScript-based animation frameworks and libraries that will enable you to create engaging and captivating user experiences. 1. $fx $fx is a compact and lightweight JavaScript animation library which extends native JavaScript DOM methods with its own animation methods and functions. Its small file size (weighing in at only 3.7 KB), hassle-free implementation, and low learning curve makes $fx a powerful option for adding eye-popping animation effects to your web projects. 2. jsAnim Created by web developer Kevin Dolan, jsAnim is a JavaScript animation framework for creating high-impact and slick animation sequences for web interfaces. 3. scripty2 5. 6. 7. 8. 9. 10. Related content

Is It Too Late To Change JSON? In my last post, I wrote about the hijacking of JSON arrays. Near the end of the post, I mentioned a comment whereby someone suggests that what really should happen is that browsers should be more strict about honoring content types and not execute code with the content type of application/json. I totally agree! Another potential solution that came to mind was this: Can we simply change JSON? boat-left-harbor Let me run an idea by you. One way to do this, and I’m just throwing this out there, is to make it such that the JSON package must always begin and end with a curly brace. But when the response is a JSON array, we would go from here: to here: Client code would simply check to see if the JSON response starts with {[ to determine whether it’s an array, or an object. It’d be possible to do this without breaking every site out there by simply giving all the client libraries a head start. So what do you think?

caja - Compiler for making third-party HTML, CSS and JavaScript safe for embedding (This site is for programmers actively working on Caja, rather than using it for their own projects.) The Caja Compiler is a tool for making third party HTML, CSS and JavaScript safe to embed in your website. It enables rich interaction between the embedding page and the embedded applications. Caja uses an object-capability security model to allow for a wide range of flexible security policies, so that your website can effectively control what embedded third party code can do with user data. Contacting us Discussions Our discussion group is the best place to contact us. Reporting Bugs & Security Issues Please report potential vulnerabilities using the private issue tracker, and bugs and feature requests via the public issue tracker. Contributing The Caja team includes people from a number of different companies and some private individuals. News Talks

jQuery Lightbox Evolution Lightbox Evolution is a tool for displaying images, html content, maps, and videos in a “lightbox” style that floats overtop of web page. Using Lightbox Evolution, website authors can showcase a wide assortment of media in all major browsers without navigating users away from the linking page. Screenshots Testimonials Themes iPad Compatible Technical Support If you have any questions, please contact me from my profile page here. Changelog 1.8.0 (Aug 17 2013) * jQuery 2.0 compatible * JW Player 6 compatible 1.7.3 (Feb 24 2013) * Fixed multiple galleries bug. * Added youku.com video server. * Fixed '__flash__removeCallback' is undefined error in all versions of IE. 1.7.2 (Feb 21 2013) * Fixed data-options bug with malformed JSON. 1.7.1 (Feb 17 2013) * Now you can change the duration of the transition "loading". 1.7.0 (Jan 25 2013) * Added retina support to default theme. * Added retina support to evolution theme. * Added retina support to carbono theme. * Changed default animation.

On Design Minimalism April 2009 ... or, How to implement "includes" on top of JSON Template ... or, Avoiding the Dinosaur Snaggletooth After introducing JSON Template, the most common feature request was for some kind of include or macro system. The language isn't frozen yet by any means, but it's meant to have a minimal design, while still retaining power. This article includes two detailed examples that show how JSON Template solves the problem of reuse, without any new features. Contents Two Template Reuse Patterns Sample program for reuse on the "outside" Sample program for reuse on the "inside" Functional Programming Now onto Design Minimalism Another example of multiple problems addressed by a single solution Conclusion Two Template Reuse Patterns Notice that an "include" or "macro" system is actually a solution. The problem is reuse, or avoiding duplication between template files. Reusing a template "inside" another template. I have less experience with the "inheritance" model. The idea is simple: Problems:

Apps Platform This document describes what Gmail contextual gadgets are, how to write them, how to install them, and how to diagnose and fix some common issues. Gmail contextual gadgets can be listed for sale in the Google Apps Marketplace or used within in-house applications installed through the Google Apps console. Prerequisites This document assumes: You know what a gadget is and have a rough idea how to write one (see Getting Started guide for the gadgets.* API).You can post files to public Internet. If you do not have web hosting, then you can post gadgets with the Google Gadget Editor. What is a Gmail contextual gadget? A Gmail contextual gadget is a gadget that is triggered by clues in Gmail, such as the contents of Subject lines and email messages. There are two development and deployment models: Develop a Gmail contextual gadget for use within a single organization's Google Apps domains (an in-house application).List the gadget for sale on the Google Apps Marketplace. Extractor Gadget spec <? <! <! <?

JavaScript : 3 fondamentaux Après quelques années à écrire dans un langage, on finit facilement par oublier les premières difficultés que l’on avait rencontrées. Et à force de faire de la veille, de l’autoformation et de parler entre experts dans des conférences, j’ai un peu quitté la réalité de la majorité des équipes Web. Maintenant que je suis consultant indépendant je retourne dans des équipes qui avaient autre chose à faire que de se demander si on a le droit de parler de classe en JavaScript, quelle est la bonne définition d’une closure, ou quelles sont les fonctionnalités de EcmaScript 5 qui auraient du rester dans Ecmascript.Next. J’avais déjà parlé sur ce blog de JavaScript et la programmation orienté objet pour les développeurs PHP, nous allons explorer ici les 3 notions fondamentales de JavaScript qui sont probablement les plus grosses sources de bugs, d’incompréhension et de frustration pour le développeur Web moyen. Et qui accessoirement sont la base d’une programmation plus évoluée par la suite.

Related: