Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
n4kz committed Jan 16, 2013
1 parent cc843a2 commit a670a97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion readme.md
Expand Up @@ -8,15 +8,17 @@ Simple logger for client-side errors

# Client

Load kaldr
```html
<iframe id="#logger" src="http://localhost:3000/kaldr.frame#" style="display:none"></iframe>
```

Send message to kaldr
```js
var logger = document.getElementById('logger'),
src = logger.getAttribute('src').split('#')[0];

window.onerror = function (mesage, file, line) {
logger.setAttribute('src', src + '#' + message + ' in ' + file + ' at line ' + line)
logger.setAttribute('src', src + '#' + message + ' in ' + file + ' at line ' + line);
};
```

0 comments on commit a670a97

Please sign in to comment.