How do I add customElements support for Opera 12?

6

I'm working with customElements, but I've been having a problem with Opera 12.

So far the best I've been was to use x-tags but the same as only support document.register and this differs slightly from the W3C API , another drawback is that it does not support document.registerElement .

Continuing my research I found the Polymer-project which is very promising and in Webkit it worked very well, however in Opera, when running plataform.js of the Polymer, this causes the subsequent scripts to start giving errors, making stop for example connection with websocket and can not even execute polymer.js to add support for customElements.

On the basis of this information, I would like to know if anyone could help me with a consistent solution for Opera that does not break the native implementations of it and support the document.registerElement as close to the W3C draft API as possible. p>     

asked by anonymous 31.01.2014 / 06:08

1 answer

5

After much research on the subject, I discovered that there is a polyfill that was made by the Polymer team, which is independent of plataform.js and adds support for modern browsers to Custom Elements quite well.

link

I tested this Polymer-independent lib with Opera 12 and succeeded in using the document.register and document.registerElement methods with all features documented in the current W3C draft.

Just to note, this lib adds only the features required for Custom Elements. HTMLImport, Object.observer and other resources used in the Polymer will have to be loaded separately if you wish to use them.

    
01.02.2014 / 06:54