Skip to content

Instantly share code, notes, and snippets.

@develar
Created October 9, 2012 07:06
Show Gist options
  • Save develar/3857103 to your computer and use it in GitHub Desktop.
Save develar/3857103 to your computer and use it in GitHub Desktop.
val domainToEnable = when {
command.method.startsWith("Debugger.") -> dom.debugger
command.method.startsWith("Page.") -> dom.page
else -> null
}
if (domainToEnable != null) {
domainToEnable.enable({ sendError(tabId, command, chrome.extension.lastError!!) }) {
sendResult(tabId, command)
}
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment