Recent Insights
Search
Dojo FAQ: What is the difference between dojo/on and dojo/aspect?
Dojo FAQ: What is the difference between dojo/on and dojo/aspect?

dojo/on and dojo/aspect are two APIs that appear to do similar jobs but actually serve two different purposes. dojo/on is used to setup event listeners for DOM nodes and event-emitting objects.

Read More
Dojo FAQ: How do you set a default selected RadioButton?
Dojo FAQ: How do you set a default selected RadioButton?

The widgets provided in Dojo’s Dijit library include not only advanced widgets not provided by HTML, but also enhanced versions of the basic HTML form elements, like <input>. Dijit’s dijit/form/RadioButton provides the same basic functionality as an HTML radio button, so let’s look at how you set one to be checked by default.

Read More
Creating Dojo Widgets with Inline Templates
Creating Dojo Widgets with Inline Templates

Many Dojo widgets make use of client-side templating for generating the UI. Template HTML files are brought in to the page with dojo/text, parsed and converted to DOM nodes, and placed on the page, allowing our code to make substitutions, instantiate widgets within the template, and hook up events and attach points.

Read More
Dojo FAQ: How do I use CORS with Dojo?
Dojo FAQ: How do I use CORS with Dojo?

In web browsers that support Cross-Origin Resource Sharing (CORS) via XMLHttpRequest objects, Dojo’s XHR mechanism can make cross-domain requests out of the box. Because of the same-origin policy of XMLHttpRequest, Dojo has long supported various methods of loading resources across domains – dojo/io/script and dojo/io/frame; dojo/request/script and dojo/request/iframe in recent versions (1.8+).

Read More
Private Matters: Convention and Closures
Private Matters: Convention and Closures

Many object-oriented programming (OOP) languages provide a way to define private properties and methods. This allows objects to encapsulate functionality and state information.

Read More
Persevere on Heroku
Persevere on Heroku

It is becoming increasingly popular to deploy Node.js-based applications to Node-friendly hosting services to take advantage of the pre-built, reliable, robust architecture and infrastructure these services provide. Persevere, a JavaScript server framework for developing RESTful applications on Node.js, is an excellent fit for these types of hosting services.

Read More
A SitePen Christmas Special
A SitePen Christmas Special

What a great year 2013 has been! We’re feeling (collectively) like Ebenezer Scrooge in the final chapters of Charles Dickens’ A Christmas Carol – except we haven’t been jerks up ’til now and we think working at SitePen is a year-round Christmas vacation, unlike the earlier chapters wherein Scrooge forces poor Mr. Cratchit to work by the heat of a candle.

Read More
Dojo FAQ: Why am I getting &#8220;Error: Tried to register widget with id==xxx but that id is already registered&#8221;?
Dojo FAQ: Why am I getting “Error: Tried to register widget with id==xxx but that id is already registered”?

A common error when using Dijits is “Tried to register widget with id==XXX but that id is already registered”. That is the dijit/registry telling us that we’ve made a mistake instantiating a widget.

Read More
Dojo FAQ: What is the difference between set and _set?
Dojo FAQ: What is the difference between set and _set?

Dijit widgets provide the ability to write custom setters and getters, whose logic is executed when calling the set and get methods. dijit/_WidgetBase also provides a _set method, which is very important when writing widgets, but can cause a bit of confusion due to its name.

Read More
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Privacy Policy