The principle of some javascript library