Browse files

API changes

  • Loading branch information...
1 parent 325a3f8 commit 9bc50dd06716a670845a4fd19918fbad52d6d4c1 @NV committed Jun 30, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 README.mdown
View
10 README.mdown
@@ -25,12 +25,10 @@ That’s it. Files have been saved.
Google Chrome has an [onResourceContentCommitted event](http://code.google.com/chrome/extensions/dev/experimental.devtools.inspectedWindow.html#event-onResourceContentCommitted) that fires when you edit CSS and JavaScript.
- chrome.experimental.devtools.inspectedWindow.onResourceContentCommitted.addListener(function(event) {
- event.url
- event.type // 'script', 'stylesheet' or 'document' (happens when you add new CSS rule)
- event.getContent(function(content) {
- content // all the content of updated file as a string
- })
+ chrome.experimental.devtools.inspectedWindow.onResourceContentCommitted.addListener(function(resource, content) {
+ resource.url
+ resource.type // 'script', 'stylesheet' or 'document' (happens when you edit inline JS or CSS)
+ content // all the content of updated file as a string
})
Nice, isn’t it?

0 comments on commit 9bc50dd

Please sign in to comment.