414owen / nutmeg-core Goto Github PK
View Code? Open in Web Editor NEWA 1:1 mapping of HTML code to JavaScript function calls
A 1:1 mapping of HTML code to JavaScript function calls
Need a way of getting a canvas element, with correct settings for hiDPI, and getting a context.
We should check if an argument to an elified is text.
Current Syntax:
h1(
text('Hello World')
)
Proposed Syntax:
h1(
'Hello World'
)
I'm not sure that this is worth the complication it will cause in the code.
Effectively, "div" itself needs to be elified, or at least have the same functions as an elified element, i.e. div.style, div.classes, etc. And the start of these functions need to actually construct a new elified div.
div().style(): Easy. A new div is created by div().
div.style(): The new div needs to be created (or retrieved, in the case of body) within style(). I imagine div will have a reference to a constructor of either div elements or elified div elements.
Support pseudo-elements in style engine.
Should be able to simulate them all with Javascript, onmouseover() and onmouseout() for hover, that sort of thing.
Proposed Syntax:
mystyle: {
color: '#ddf',
hover: {
color: '#fdd'
}
}
I think we can loop over all the properties in an element, and create functions in elified that assign to them, before setting our custom ones.
for (var propName in elem) {
elified.propName = function(val) {elem.propName = val;};
}
I just don't have time to experiment with it right now, so @Zantier if you want something to do today?
It might impact performance a bit, maybe run a profile on example.html before and after?
Seriously. We need this.
We need to add enough JSDoc blocks for closure to know what to do.
When we get it to the stage where it compiles, we can turn on advanced optimizations and es6 -> es5 transpilation. Should make the whole process a lot nicer.
Works well on mobile versions of Chrome, Firefox and Opera, but not the stock Android 6 browser.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.