CanJS makes it really easy to build web components. Why easy:
CanJS has a class-based, Object Oriented API:
class MyCounter extends StacheElement {
<body> | |
<script> | |
class HelloWorld extends HTMLElement { | |
constructor() { | |
super(); | |
this.rendered = false; | |
this.depth = 0; | |
} |
Responsibilities
Other
<ul class="seasons">
<li class="season" ng-repeat="season in seasons">
Season {{season.seasonNumber}}
</li>
</ul>
(function(){ | |
if (typeof self === 'undefined' || !self.Prism || !self.document || !document.querySelector) { | |
return; | |
} | |
function $$(expr, con) { | |
return Array.prototype.slice.call((con || document).querySelectorAll(expr)); | |
} |
95%/ Month
retention (down from 99%)"use strict"; | |
var canReflect = require("can-reflect"); | |
var canSymbol = require("can-symbol"); | |
var namespace = require("can-namespace"); | |
var queues = require("can-queues"); | |
var canAssign = require("can-assign"); | |
//!steal-remove-start | |
if(process.env.NODE_ENV !== 'production') { | |
var canLog = require("can-log/dev/dev"); |