JC Fant IV
About
JC Fant IV is a Software Engineer at Amazon.com. He has been working as a Web Developer for the last 10 years. Currently he is diving into performance and other technologies around JavaScript.
Current Projects
Currently I am working on test for JSPerf and what it means for Javascript in General. Many things we think we know to be true, may in the end be incorrect. Do this, not that!
Topics
- Closure (1)
- Compilers (1)
- CSSLint (1)
- Debugging (1)
- Do This, Not That (4)
- JavaScript (12)
- jQuery (7)
- Performance (4)
- Underscore.JS (3)
Tags
-
Category Archives: JavaScript
Constantly “Connecting” in FireFox
This is an interesting issue, sometimes we see in FireFox 9 and above an issue where the tab title will actually get set to a state where it says “Connecting” and the spinner is constantly in motion. One of the things I found recently when I discovered this was quickly writing out DOM elements and [...]
Posted in JavaScript
Leave a comment
How to create and write to an iframe without jQuery
Recently, I had an issue where I was trying to figure out how to create an iframe, and then append some items into it. Well, it turns out to not be nearly as complicated as I thought.
Posted in JavaScript
Leave a comment
Removing Debug Statements from Javascript via compiler
We all know the pain of getting a bug filed against some of your code and having to dig through it later to find the root cause. Especially, since many times we end up having to add back in all of our debug statements in order to track down the issue. There has to be [...]
Posted in Closure, Compilers, Debugging, JavaScript
Tagged as: closure compiler, debugging, javascript
Leave a comment
Parallel Downloading HTML Assets
Question: Image - inline Script - image, are the images parallel? Souders just posted the following tweet. Someone out in #webperf land should test how inline scripts block downloads - eg, image - inline script - image - are the images parallel? So here is my response to the question...
Getting A Class From a DOM Element
Lately, if I am searching for a way to do something in Javascript the only results I am getting ways of doing the procedure using jQuery. While, its true jQuery is pretty much the de facto standard for writing JavaScript anymore, understanding the underlying technology is a must. As well as alot of times, I [...]
Lazy Loading Functions
The best part about this Javascript pattern is the ability to calculate once and then use the new function definition from that point forward. During the course of building web apps, we usually end up with functions to do certain tasks. However, since those tasks sometimes need to be done differently in each of the [...]
Patterns for enforcing “new”
Recently I was looking around for a book on JavaScript Patterns. I decided to give the JavaScript Patterns by Stoyan Stefanov a try. If you have been looking for a book on Javascript Patterns, I highly recommend this book. In the 3rd chapter, Literals and Constructors, I noticed this section on "Patterns for enforcing new" [...]
Closure Versus Prototypal Object Creation
I was just looking through a new blog post from Brendan Eich over on AMinuteWithBrendan where he went into some detail on Closures versus Prototypal Patterns. After listening to his pod cast, (you can find the transcript here), I decided to put the two patterns to test. So I fired up a new test on [...]
Writing and Updating DOM Elements in a Frame
Handling writing and updating objects in an iframe can be bothersome in most browsers. Sure things like jQuery tend to help, but not always. A normal way to access a frame in jQuery is below: $("#FRAME").contents() Now, lets say you actually want to get another element inside of the frame, lets get the HEAD element. [...]
$(“#ID”) is fast enough
We all know that the fastest selector to use is the ID. Something like $("#id") is better than using a class. However, after looking at the last test we did on The Great Assumption - JavaScript I noticed a large discrepancy in $("#ID") versus the native document.getElementById(). Now, I always assumed it was slower, but [...]