|
Hi, I actually came across this issue while using Polymer's platform.js... I could not make it work... I have to do magic like this... <element name="x-bauglir-listitem" constructor="XBauglirListItem"> <script> if (this !== window) { var first = true; this.register({ prototype: { "readyCallback": function() { if (first) { Object.defineProperties(XBauglirListItem.prototype, { "foox": { "value": function() { alert('d'); }, } }); } first = false; }, } }); } </script> </element> putting the definition outside readyCallback caused unknown XBauglirListItem error so I'm wondering how it's gonna be in web Components... since the mechanism is the same... until readyCallback i called, the construstor function does not exists I assume ------------------- ({
readyCallback: function() { },
get foo() {},
set foo() {}
})
confuses me... I 've seen the whole ({ }) contruct in web comps for the first time and I think it's web comps specific... and the setters and getters... from your example... are those getter and setters for method foo or property foo? Shouldn't setter have a parameter? The value that is about to be set? how do I define whether property is changable, enumerable? Or is this working proposition of Web Comps based on working proposition of ES6? Brona On 23.6.2013 21:11, Scott Miles wrote:
--
s pozdravem
Bronislav Klučka
http://www.bauglir.com [email protected] * webové aplikace * software na zakázku |
- Web Component Element definition Bronislav Klučka
- Re: Web Component Element definition Bronislav Klučka
- Re: Web Component Element definition Bronislav Klučka

