W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2013

Web Component Element definition

From: Bronislav Klučka <Bronislav.Klucka@bauglir.com>
Date: Sun, 23 Jun 2013 20:42:12 +0200
Message-ID: <51C74184.9050400@bauglir.com>
To: public-webapps@w3.org
Hi,
http://www.w3.org/TR/2013/WD-components-intro-20130606/#lifecycle-callbacks
shows defining element methods, next to the life cycle it also shows 
definition of methods "ticks" and "chime",
I wonder how this construct

({

});

is compatible with ES5 object properties descriptors, in ES5 it is 
possible to define getters and settes for properties/methods, is it the 
possible to do something like

<element .....>
...
<script>

({
   readyCallback: function () {
     //init component
   },
});

Object.defineProperties(this.prototype, {  // or maybe 
Object.defineProperties(this, {
   "property": {
         "get": function() { return 5; }
         "set": function(value) {}
     }
});
</script>

</element>

Will it work? Is it suppose to work?

Brona
Received on Sunday, 23 June 2013 18:42:38 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:55 UTC