Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

Convert HTML string to DOM element

posted in JavaScript on 2013-06-11   var markup output el link html frame contentdocument document createelement dom element

Checkout Revealing the magic: How to properly convert HTML string to a DOM element article.

I'm working on a chrome extension which accepts user text, work with it and output the result in a div. I used jQuery in the beginning, for several tasks, but later I decided to remove it and deal with pure javascript/DOM manipulations. The output div was filled by using innerHTML property and everything was ok. But, at some point, I sent few buttons to the user and he has to interact with them. However, once I update the div's content the event listeners are detached and the buttons became non-functional.

read more

How to generate SWC file from ActionScript package

posted in ActionScript on 2010-12-18   swc file classes output generated swc file compc exe usage

SWC file format is really useful when you want to transfer or to compact your ActionScript libraries. It is also used for exporting assets, which can be used later. Let's imagine that you want to create a .swc file for only small part of your application, i.e. pure .as files. I searched a lot for the fastest and easier solution and finally I think that the usage of compc.exe is the best option.

read more