Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: sky/framework/inspector/console-agent.sky

Issue 837933003: Convert the inspector framework to use ES6 classes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: prevent extensions Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/framework/inspector/css-agent.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/inspector/console-agent.sky
diff --git a/sky/framework/inspector/console-agent.sky b/sky/framework/inspector/console-agent.sky
index 58240d81eb768afdda1a44f1a369293fd2da1c19..f8628568fc5bb03e3900de218c7906a0e93ac7d4 100644
--- a/sky/framework/inspector/console-agent.sky
+++ b/sky/framework/inspector/console-agent.sky
@@ -1,12 +1,15 @@
<script>
-function ConsoleAgent() {
-}
+class ConsoleAgent {
+ constructor() {
+ Object.preventExtensions(this);
+ }
-ConsoleAgent.prototype.enable = function() {
- return {
- result: true,
- };
-};
+ enable() {
+ return {
+ result: true,
+ };
+ }
+}
module.exports = ConsoleAgent;
</script>
« no previous file with comments | « no previous file | sky/framework/inspector/css-agent.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698