Archive of posts filed under the JavaScript category.
Client-side JavaScript is primarily implemented as part of a web browser in order to provide enhanced user interfaces and dynamic websites.
When loading a web page with PhantomJS is it possible to fake the referrer by setting the page.customHeaders property to include “Referer”. However, this will be sent to all page objects (images, CSS etc…), which is not the desired result. The workaround in the PhantomJS API documentation is incorrect. Read on to find out how …
Don’t use the for…in statement to iterate over JavaScript arrays because the result might not be what you were expecting. Read on to find out the correct way to iterate over a JavaScript array.
Recently I needed to fix a SugarCRM 7 view that had been customised/extended in JavaScript and accidentally broken. It turned out that the “events” object had been overridden instead of extended, and the view had lost some functionality.