Skip to content
Permalink
Browse files
Open the Sky
  • Loading branch information
abarth committed Oct 23, 2014
0 parents commit 00882d626a478a3ce391b736234a768b762c853a
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
@@ -0,0 +1,2 @@
These are work-in-progress examples of how the language might look.
They won't currently work.
@@ -0,0 +1,78 @@
SKY MODULE - radio button and radio button group
<!-- accessibility handling not implemented yet, pending mojo service -->
<import src="sky:core" as="sky"/>

<!-- <radio> -->
<template id="radio-shadow">
<style>
:host { width: 1em; height: 1em; border: solid; background: white; }
:host[checked] { background: black; }
</style>
</template>
<script>
module.exports = {};
module.exports.RadioElement = sky.registerElement('radio', class extends Element {
constructor () {
this.addEventListener('click', (event) => this.checked = true);
this.createShadowTree().appendChild(module.document.findId('radio-shadow').cloneNode(true));
}
get checked () {
return this.hasAttribute('checked');
}
set checked (value) {
if (value)
this.setAttribute('checked', '');
else
this.removeAttribute('checked');
}
get value () {
return this.getAttribute('name');
}
set value (value) {
this.setAttribute('value', value);
}
attributeChanged(name, oldValue, newValue) {
if ((name == 'checked') && (newValue != null))
if (this.parentNode instanceof module.exports.RadioGroupElement)
this.parentNode.setChecked(this);
}
});
</script>

<!-- <radiogroup> -->
<template id="radiogroup-shadow">
<style>
:host { padding: 1em; border: thin solid; }
</style>
</template>
<script>
module.exports.RadioGroupElement = sky.registerElement('radiogroup', class extends Element {
constructor () {
this.createShadowTree().appendChild(module.document.findId('radiogroup-shadow').cloneNode(true));
}
get value () {
let children = this.getChildNodes();
for (let child of children)
if (child instanceof module.exports.RadioElement)
if (child.checked)
return child.name;
return '';
}
set value (name) {
let children = this.getChildNodes();
for (let child of children)
if (child instanceof module.exports.RadioElement)
if (child.value == name)
child.checked = true;
}
setChecked(radio) {
if (!((radio instanceof module.exports.Radio) && radio.parentNode == this))
throw;
let children = this.getChildNodes();
for (let child of children)
if (child instanceof module.exports.RadioElement)
if (child != radio)
child.checked = false;
}
});
</script>

24 comments on commit 00882d6

@genert
Copy link

@genert genert commented on 00882d6 Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where it all started. Whoop, whoop!

@krispypen
Copy link

@krispypen krispypen commented on 00882d6 Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎂

@renancaraujo
Copy link
Contributor

@renancaraujo renancaraujo commented on 00882d6 Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed so much...
And the sky extension also.

@deimantasa
Copy link

@deimantasa deimantasa commented on 00882d6 Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧁🍰

@maheshmnj
Copy link
Member

@maheshmnj maheshmnj commented on 00882d6 Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy Birthday Flutter, Glad you exist 🎉 🔥

@OrionWambert
Copy link

@OrionWambert OrionWambert commented on 00882d6 Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy Birthday to me and to flutter !

@zmtzawqlp
Copy link
Contributor

@zmtzawqlp zmtzawqlp commented on 00882d6 Oct 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy Birthday to flutter

@ayush221b
Copy link

@ayush221b ayush221b commented on 00882d6 Oct 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a wonderful moment in history.

@YazeedAlKhalaf
Copy link
Contributor

@YazeedAlKhalaf YazeedAlKhalaf commented on 00882d6 Jun 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy Birthday, Flutter! -3 days 😹

Better late than NEVER!

@skohan
Copy link

@skohan skohan commented on 00882d6 Jul 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The beginning of flutter. Happy late birthday!! May be I can understand core of flutter from here xD

@sumate-sdk
Copy link

@sumate-sdk sumate-sdk commented on 00882d6 Aug 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much work had been done to make it this far? I appreciate these developers.

@perseus98
Copy link

@perseus98 perseus98 commented on 00882d6 Jan 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from here, flutter-ing became a real thing XD

@sumitsahoo
Copy link

@sumitsahoo sumitsahoo commented on 00882d6 Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will go down in history. Declarative style of building an app is just awesome 👏

@WillianKirsch
Copy link

@WillianKirsch WillianKirsch commented on 00882d6 Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who knew he would become who he is today! <3

@binSaed
Copy link

@binSaed binSaed commented on 00882d6 Feb 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not only one who checks init commit😅

@werainkhatri
Copy link
Member

@werainkhatri werainkhatri commented on 00882d6 Jun 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the commit message. Once @abarth Opened the Sky, sky became the limit <3.

@tadaspetra
Copy link
Contributor

@tadaspetra tadaspetra commented on 00882d6 Aug 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the Greatest Commits of All Time!

@inzkhan
Copy link

@inzkhan inzkhan commented on 00882d6 Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The beginning of extraordinary framework.

@ToMakeSense
Copy link

@ToMakeSense ToMakeSense commented on 00882d6 Sep 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flutter — The sky’s the limit

@StanislawNagorski
Copy link

@StanislawNagorski StanislawNagorski commented on 00882d6 Sep 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The day sky was open 👍 🥇

@1UC1F3R616
Copy link

@1UC1F3R616 1UC1F3R616 commented on 00882d6 Oct 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy Belated Birthday, I'm 1 day late whoops xD

@JohnKinyanjui
Copy link

@JohnKinyanjui JohnKinyanjui commented on 00882d6 Nov 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

am here to confirm if i have 4 -7 years experience for a flutter job in 2021 😂😂😂

@OrionWambert
Copy link

@OrionWambert OrionWambert commented on 00882d6 Nov 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

am here to confirm if i have 4 -7 years experience for a flutter job in 2021 😂😂😂

:)

@OrionWambert
Copy link

@OrionWambert OrionWambert commented on 00882d6 Nov 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy Birthday to me and to flutter !

I'm here since 2019

Please sign in to comment.