mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This is called right after stamping the template into the ShadowRoot. This is a useful place to querySelector/getElementById for elements inside the ShadowRoot. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/817053002
28 lines
699 B
Plaintext
28 lines
699 B
Plaintext
<!--
|
|
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
-->
|
|
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
|
|
|
|
<sky-element name="test-element">
|
|
<template>
|
|
<div id="inside" on-test-event="handleEvent" attr="{{ value }}">{{ value }}</div>
|
|
</template>
|
|
<script>
|
|
module.exports = class extends SkyElement {
|
|
created() {
|
|
this.lastEvent = null;
|
|
this.value = 10;
|
|
this.shadowRootReadyCount = 0;
|
|
}
|
|
handleEvent(event) {
|
|
this.lastEvent = event;
|
|
}
|
|
shadowRootReady() {
|
|
this.shadowRootReadyCount++;
|
|
}
|
|
}.register();
|
|
</script>
|
|
</sky-element>
|