Skip to main content

Home/ javascript/ Group items tagged ##javascript

Rss Feed Group items tagged

Ivan Pavlov

javascript [ES Wiki] - 1 views

  •  
    This is a wiki for the ongoing specification work of Ecma TC39, the technical committee tasked with standardization of the ECMAScript programming language. Most of the wiki is world-readable, meaning that anyone can view the pages. Certain sections are restricted to members of the technical committee.
Javier Neira

The difference between 'return false;' and 'e.preventDefault();' | The Hostma... - 2 views

  •  
    function() { return false; } // IS EQUAL TO function(e) { e.preventDefault(); e.stopPropagation(); }
Javier Neira

Michael Sharman - chapter31 » Including js files from within js files - 1 views

  •  
    01.//this function includes all necessary js files for the application 02.function include(file) 03.{ 04. 05. var script = document.createElement('script'); 06. script.src = file; 07. script.type = 'text/javascript'; 08. script.defer = true; 09. 10. document.getElementsByTagName('head').item(0).appendChild(script); 11. 12.} 13. 14./* include any js files here */ 15.include('js/myFile1.js'); 16.include('js/myFile2.js');
Javier Neira

Understanding JavaScript Timers « JavaScript, JavaScript - 1 views

  • By enforcing a timeout (however small) you remove the function from the current execution queue and hold it back until the browser is not busy.
  • you can make long running functions (on which no other immediate function is dependent) defer execution until more urgent routines have completed.
  • The firing of the setTimeout callback is asynchronous, the function itself will be invoked in line and after the current invocation queue
Javier Neira

Caffeinated Simpleton » Blog Archive » An Introduction to JavaScript's "this" - 2 views

  • That’s what this is expected to be, anyway. It’s expected to be a reference to the current instance of whatever object it’s defined within.
  • It’ll give an error saying that this doesn’t have a member called condiments, even though it clearly does. What happened?!
  • This is because there is no binding of functions to instances in JavaScript.
  • ...3 more annotations...
  • The setTimeout function, however, just has a reference to that function. When it calls it, it’s not aware of myHotDog, so JavaScript sets this to window
  • function HotDog() { var my = this; // my references the current this, which is correct. my.condiments = "mustard, ketchup"; my.getCondiments = function() { return my.condiments; //my is guaranteed to be a reference to the original "this" } }
  • In constructors, this is always your instance. So we created a new variable, my, that references the HotDog instance. This allows you to always refer to the HotDog instance, no matter how the getCondiments function is called.
Mike More

Efficiently Getting Delicious Save Count of Your Posts - 0 views

  •  
    Although there are many sites that describe how to get Delicious bookmaking count of some URL. I learned that you can get the save counts of multiple URL's in one request! And since I didn't see that mentioned anywhere -even on Delicious feeds API page- I thought I should do..
yc c

ColorPicker 0.6 - 0 views

  •  
    This colorPicker is a light weight all-rounder (only ~46k incl. all 16 files) that can display and let you choose the entire color palette (~16.78 mil. colors) in 6 different color modes (+3 extra modes in RGB). This highly customizable and easy to install app comes in 4 different sizes (from 151 x 87 pixels to 405 x 302 pixels) and therefore different feature levels so you can use it for every supposable cause from 'easy choice' to 'professional determination'. That's probably all you'll ever need to let your clients choose the right color.
‹ Previous 21 - 40 of 429 Next › Last »
Showing 20 items per page