Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
  <a href="javascript:void(0)" onclick="jsFunct('hello');">test</a>
</body>
</html>
 
function jsFunct(a) {
    console.log(a);
}
function augment(withFn) {
    var name, fn;
    for (name in window) {
        fn = window[name];
        if (typeof fn === 'function') {
            window[name] = (function(name, fn) {
                var args = arguments;
                return function() {
                    withFn.apply(this, args);
                    fn.apply(this, arguments);
                };
            })(name, fn);
        }
    }
}
augment(function(name, fn) {
    console.log("calling " + name);
    
    // window.external.someC#method
});
setTimeout(function() {
 jsFunct('test'); 
}, 1000);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
jeff_mccoypro
0viewers