9 Commits

Author SHA1 Message Date
Adam Barth
fe31fd0e4c Port sky-scrollable to Dart
This CL ports sky-scrollable to the new sky-element.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/950603002
2015-02-21 09:56:22 -08:00
Adam Barth
7d00bd5e06 Implement Custom Elements
This CL implements custom elements. The design is as follows:

1) Authors subclass Element and call registerElement.
2) When we create C++ elements for custom elements, we call the author's
   constructor synchronously.
3) The attach/detach/attributeChanged callbacks are called either:
   a) when exiting the current custom element callback scoped (e.g., before
      returning from appendChild), or
   b) when draining the microtask queue.

The implementation in this CL is a bit fragile because we don't detect name
registration conflicts and we let you create custom elements with the same name
as built-in elements. Also, not every part of the engine is prepared to execute
script synchronously below createElement. We'll need to iron out these issues
over time, but this CL is a start.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/943013002
2015-02-20 16:15:42 -08:00
Adam Barth
7d9b6f1b8f Delete Sky tests that we're not going to run with Dart
This CL removes a number of tests that we don't plan to port to Dart:

1) custom-elements. We're going to use a different mechanism for custom
   elements. We'll need to write a new set of tests as we implement it.
2) inspector. These are tests of the JS inspector backend, which we don't
   plan to use.
3) js. This is a test of a JavaScript feature.
4) mocha. These are tests of the JavaScript testing framework we were using.
5) mutation-observer. We're keeping the C++ code for mutation observers, but
   it's unclear how we want to expose this in the platform.
6) resources. These are JavaScript-based testing frameworks.

R=eseidel@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/920343002
2015-02-13 13:51:26 -08:00
Elliott Sprehn
bb7f5d05bf Improve custom-elements/generated-constructor.sky test.
We should inherit from HTMLElement, Sky (and blink) don't currently
enforce this but they probably should. We should also explicitly
check that the prototype is what we expect.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/809183002
2014-12-17 15:01:17 -08:00
Elliott Sprehn
4a9e21a78c Custom elements should have class side inheritance.
We were not setting the __proto__ property of the generated constructor
so the generated class didn't inherit from the passed class which meant
that statics were not available.

This patch adds the missing call to setPrototype (which sets __proto__).

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/814683002
2014-12-17 14:24:34 -08:00
Adam Barth
4240a776a4 Replace <link rel="import"> with <import>
This CL is just a search-and-replace.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/694423002
2014-11-03 12:34:57 -08:00
Adam Barth
83f05ff8bf Use module.exports rather than this.exports
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/687263005
2014-10-29 15:21:28 -07:00
Hixie
de0ba17e8f Move the tests from .html to .sky
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/685623002
2014-10-27 17:35:15 -07:00
Adam Barth
ae72930937 Open the Sky 2014-10-23 11:17:19 -07:00