loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.05666931133443409","path":"main.js","file":{"path":"main.js","content":{"asEncoding":{"base64":"dmFyIGxpdGVyYWxMYW5ndWFnZSA9IHsKICJuYW1lIjoiUHl0aG9uIiwKICJ2ZXJzaW9uIjoiMi43IiwKICJoZWxsbyI6ZnVuY3Rpb24oKSB7IHJldHVybiAiSGVsbG8gZnJvbSAiICsgdGhpcy5uYW1lfSwKIGdldCBsYW5ndWFnZSgpIHsgCiAgIHJldHVybiB0aGlzLm5hbWUgKyAiICIgKyB0aGlzLnZlcnNpb247CiB9LAogc2V0IGxhbmd1YWdlKHZhbHVlKSB7IAogIFt0aGlzLm5hbWUsIHRoaXMudmVyc2lvbl0gPSB2YWx1ZS5zcGxpdCgiICIpOwogfSwKfTsKCi8vIFZlcmlmeSBwcm9wZXJ0eSB2YWx1ZSBhY2Nlc3MKY29uc29sZS5sb2cobGl0ZXJhbExhbmd1YWdlLm5hbWUpOwpjb25zb2xlLmxvZyhsaXRlcmFsTGFuZ3VhZ2UudmVyc2lvbik7CmNvbnNvbGUubG9nKGxpdGVyYWxMYW5ndWFnZS5oZWxsbygpKTsKLy8gQWNjZXNzIGxhbmd1YWdlIHRoYXQgdXNlcyBnZXQgCmNvbnNvbGUubG9nKGxpdGVyYWxMYW5ndWFnZS5sYW5ndWFnZSk7CgovLyBVcGRhdGUgbGFuZ3VhZ2Ugd2l0aCBzZXR0ZXIgCmxpdGVyYWxMYW5ndWFnZS5sYW5ndWFnZSA9ICJKYXZhU2NyaXB0IDUiOwoKLy8gVmVyaWZ5IHByb3BlcnR5IHZhbHVlcwovLyBBY2Nlc3MgdXBkYXRlZCBsYW5ndWFnZSB0aGF0IHVzZXMgZ2V0CmNvbnNvbGUubG9nKGxpdGVyYWxMYW5ndWFnZS5sYW5ndWFnZSk7Ci8vIGxhbmd1YWdlIHNldCB1cGRhdGVkIGluaXZpZHVhbCBvYmplY3QgcHJvcGVydGllcyAgCmN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YW5ndWFnZSB3aXRoIHNldHRlciAKaW5zdGFuY2VMYW5ndWFnZS5sYW5ndWFnZSA9ICJKYXZhU2NyaXB0IDUiOwoKLy8gVmVyaWZ5IHByb3BlcnR5IHZhbHVlcwovLyBBY2Nlc3MgdXBkYXRlZCBsYW5ndWFnZSB0aGF0IHVzZXMgZ2V0CmNvbnNvbGUubG9nKGluc3RhbmNlTGFuZ3VhZ2UubGFuZ3VhZ2UpOwovLyBsYW5ndWFnZSBzZXQgdXBkYXRlZCBpbml2aWR1YWwgb2JqZWN0IHByb3BlcnRpZXMgIApjb25zb2xlLmxvZyhpbnN0YW5jZUxhbmd1YWdlLm5hbWUpOwpjb25zb2xlLmxvZyhpbnN0YW5jZUxhbmd1YWdlLnZlcnNpb24pOwpjb25zb2xlLmxvZyhpbnN0YW5jZUxhbmd1YWdlLmhlbGxvKCkpOw=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
var literalLanguage = {
 "name":"Python",
 "version":"2.7",
 "hello":function() { return "Hello from " + this.name},
 get language() { 
   return this.name + " " + this.version;
 },
 set language(value) { 
  [this.name, this.version] = value.split(" ");
 },
};

// Verify property value access
console.log(literalLanguage.name);
console.log(literalLanguage.version);
console.log(literalLanguage.hello());
// Access language that uses get 
console.log(literalLanguage.language);

// Update language with setter 
literalLanguage.language = "JavaScript 5";

// Verify property values
// Access updated language that uses get
console.log(literalLanguage.language);
// language set updated inividual object properties  
console.log(literalLanguage.name);
console.log(literalLanguage.version);
console.log(literalLanguage.hello());

var Language = function(name,version) { 
 this.name = name;
 this.version = version;
 this.hello = function() { 
   return "Hello from " + this.name;
 }
};

var instanceLanguage = new Language("Python","2.7");

Object.defineProperties(Language.prototype, {
        language: {
             get: function()    { return this.name + " " + this.version; }
            ,set: function(value) { [this.name, this.version] = value.split(" ");   }
        }
});

// Verify property value access
console.log(instanceLanguage.name);
console.log(instanceLanguage.version);
console.log(instanceLanguage.hello());
// Access language that uses get 
console.log(instanceLanguage.language);

// Update language with setter 
instanceLanguage.language = "JavaScript 5";

// Verify property values
// Access updated language that uses get
console.log(instanceLanguage.language);
// language set updated inividual object properties  
console.log(instanceLanguage.name);
console.log(instanceLanguage.version);
console.log(instanceLanguage.hello());
Native Browser JavaScript