Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / imported / web-platform-tests / custom-elements / resources / register-and-create-custom-element.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <title>Register and create custom element</title>
5     <link rel="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru">
6     <link rel="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
7 </head>
8 <body>
9     <div id="log"></div>
10     <script>
11         var proto = Object.create(HTMLElement.prototype);
12         proto.createdCallback = function() {
13             document.querySelector('#log').innerText = 'Created callback was called';
14         };
15         document.registerElement('x-element', {prototype: proto});
16     </script>
17     <x-element id="x-element"></x-element>
18 </body>
19 </html>