feifeihang.github.io
JavaScript Object.watch | FEIFEI HANG'S BLOG
http://feifeihang.github.io/2015/12/26/JavaScript-Object-watch
Research, Development, Evolution. And Object.prototype.watch. Have already been there for a while. However, there is still no common standards or whatsoever being applied and followed by all (most of) modern web browsers. These methods are pretty handy as they allow you to watch the changes of an object, and trigger a handling callback function. To make use of this brilliant concept in most browsers (for those who suppose ES5), I just wrote a Object.watch shim, you can find it at this GitHub Gist.
feifeihang.github.io
Upgrade Node.js | FEIFEI HANG'S BLOG
http://feifeihang.github.io/2015/12/25/Upgrade-Node-js
Research, Development, Evolution. Recently, the CSS Autoprefixer plugin on my Sublime Text stopped to work properly. After googling the symptom, I realized that it is time to get my Node.js upgraded. You can get this done with help of NPM:. Get Offset values in Vanilla JavaScript. A PhD candidate, passionates about Front-End Development. This post does not have a Table Of Contents. Theme - NexT.Mist.
feifeihang.github.io
Deep Copy/Clone in JavaScript | FEIFEI HANG'S BLOG
http://feifeihang.github.io/2015/12/01/Deep-Clone-in-JavaScript
Research, Development, Evolution. Deep Copy/Clone in JavaScript. For those who want to do deep copy/clone in JavaScript, below is a solution:. Temp = obj.constructor();. Prototype.hasOwnProperty.call(obj, key) {. Temp[key] = clone(obj[key]);. A PhD candidate, passionates about Front-End Development. This post does not have a Table Of Contents. Theme - NexT.Mist.
feifeihang.github.io
FEIFEI HANG'S BLOG
http://feifeihang.github.io/page/4
Research, Development, Evolution. Read more ». Thanks Takashi Ishio and et al. and their [1], a promising approach for mining coding patterns has been proposed. To be fair, the idea and method they described in their paper are quite interesting to me, because by following their way for mining patterns and information, even the variants can be traced. However, besides the brilliant method they introduced, my concern is that if their approach is really TM-based. Read more ». Read more ». Read more ».
feifeihang.github.io
React 101 | FEIFEI HANG'S BLOG
http://feifeihang.github.io/2015/11/29/ReactJS-101
Research, Development, Evolution. For those who have yet to hear/learn React, here is a very quick and brief instruction/tutorial to guide you onto the track. To start using React, you can go to React’s official site. To download its starter kit. Before that, you need include React in your HTML like this:. Since we are going to directly use JSX here in this tutorial, -. Browser.js is necessary. Otherwise, you need get JSXs transformed -. To JS by using, e.g. babel. -. Is mandatory to be imported. 123;thi...
feifeihang.github.io
DOM Event Capture and Bubbling | FEIFEI HANG'S BLOG
http://feifeihang.github.io/2015/11/27/DOM-Event-Capture-and-Bubbling
Research, Development, Evolution. DOM Event Capture and Bubbling. Early this morning, my folk Chris from IMG sent me an email regarding an issue that he encountered on his web development project. I found that it is a traditional DOM event bubbling and capture problem, and thought it may be worth to be posted here for others who also come through the same situation. A simplified version of Chris’s code is shown below:. Will also get executed. That is exactly the problem confused Chris. Bubbling is being ...
feifeihang.github.io
Get Offset values in Vanilla JavaScript | FEIFEI HANG'S BLOG
http://feifeihang.github.io/2015/12/11/Get-Offset-values-in-Vanilla-JavaScript
Research, Development, Evolution. Get Offset values in Vanilla JavaScript. Recently, I am working on my mock up project to mock up some existing web sites/pages. Soon enough after I started, it became necessary for me to find a way to get the. Values of DOM elements without using jQuery. First off, I tried to directly use. However, it doesn’t return the decent value that I expect. After searching online, I realized that the. Below is a solution provided by SLaks. Elem) elem = this. Y = elem.offsetTop;.
feifeihang.github.io
A JavaScript Promise Implementation | FEIFEI HANG'S BLOG
http://feifeihang.github.io/2015/12/02/A-JavaScript-Promise-Implementation
Research, Development, Evolution. A JavaScript Promise Implementation. As you may know that I built a promise module. For my ChopJS library a while ago. Now, below is an improved implementation I did today to support. HookedWhen = [];. Deferred.prototype = {. OrignalData = data;. Data = cb(data);. OriginalData = data;. Data = cb(data);. Expect at least 1 callback function.'. Success = = 'function'. Failure = = 'function'. HookedWhen.push(when.getPromise() ;. Promise.deferred = function. Promise = defer();.
feifeihang.github.io
Tag | FEIFEI HANG'S BLOG
http://feifeihang.github.io/tags
Research, Development, Evolution. 13 tags in total. A PhD candidate, passionates about Front-End Development. Theme - NexT.Mist.
SOCIAL ENGAGEMENT