Object.subclass("MyObject", { m: function(a) { return "BASE[" + cop.currentLayers().pluck('name').select(function(ea) { return ea.match(/^Layer[A-Z]$/)}).join(",") +"]"} }) cop.create('LayerA').refineClass(MyObject, { m: function(a) { return "<A>" +cop.proceed(a) +"</A>" } }) cop.create('LayerB').refineClass(MyObject, { m: function(a) { return "<B>" +cop.proceed(a) +"</B>" } }) cop.create('LayerC').refineClass(MyObject, { m: function(a) { return "<C>" +cop.proceed(a) +"</C>" } })
ContextJSLayerComposition_01
Export
Import
[ ] eval