You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: toolkit-kernel-explainer.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@ layout: default
3
3
title: Toolkit kernel
4
4
---
5
5
6
+
{% include outofdate.html %}
7
+
6
8
The Toolkit _kernel_ provides a thin layer of code that expresses the Toolkit
7
9
opinion, and provides the sugar that all components use. The kernel code is
8
10
provided by a file named `g-component.html`. A web component that depends on the
@@ -129,7 +131,7 @@ is not publicly callable:
129
131
Note the following:
130
132
131
133
1. There can be only one `publish` block per definition.
132
-
2. Published properties are actually stored on the **protected** prototype, then they are forwarded to the public prototype. In other words, `blueColor`(?) is different from `clickColor` only because there is a public getter/setter pair to access it.
134
+
2. Published properties are actually stored on the **protected** prototype, then they are forwarded to the public prototype.
133
135
3. Published methods still operate in protected scope: the properties you can access via `this` are no different from methods declared outside the publish block.
134
136
135
137
Bottom line: when building components use `this` naturally and declare properties and methods as you like. Then, if you happen to create API you want to make public, you just move it into the `publish` block.
0 commit comments