Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Let catchEnv be the result of calling NewDeclarativeEnvironment passing oldEnv as the argumentт.е. создаем свой «catchEnv» основываясь на «oldEnv»
[ ] subscript operator except when the subscript is a positive numeric literal or string literal.А свободный доступ к Date и Math.random опасен тем, что виджеты могут их переписать -> изменить логику других виджетов.
— Lookup of dynamic properties could provide access to the restricted members. Use the ADSAFE.get and ADSAFE.set methods instead.
— Access to these sources of non-determinism is restricted in order to make it easier to determine how widgets behave.
new Array ни []?/*jslint adsafe: true, safe: true, fragment: true, maxerr: 50, indent: 4 */:<div id="SUDOKU_">
<script>
ADSAFE.id("SUDOKU_");
</script>
<script>
ADSAFE.go('SUDOKU_', function (dom, lib) {
"use strict";
var a = [1, 2, 3, 4],
b = 'join';
a[1] = 100; // Ok
a.map(function () {
return 4;
}); // Ok
a[b](); // Error
});
</script>
var filesTree = data.getCollection("files", true);
var interface = pages.getPage("svn_tree").interface;
filesTree.asList().foreach(function (item, i) {
if (item.isFolder && item.childs.length) {
item.set("zipped", sys.command("return sys.zip(item.path, md5(item.path)).path"));
interface.append("action.download", "data.svn_tree.item.actions", "item.zipped");
}
});
sys.export(filesTree);
sys.export(interface);
Запускаем сторонний код в песочнице