Message from JavaScript discussions
February 2017
—
function refresh (finishedCallback) {
ajax("/listPages").then(function (pageList) {
var newHtml = {};
fa.forEach(pageList, function (loc, pageName) {
ajax("/pages/" + pageName, "text").then(function (html) {
newHtml[pageName] = {html: html};
});
});
fa.dispatcher.dispatch({
actionName: "refreshPages",
parameters: pageList
}, {
actionName: "refreshHtml",
parameters: newHtml
});
}).then(finishedCallback).catch(function (error) {
fa.debug.error(error);
});
}
Relevant bit is
fa.forEach(pageList, function (loc, pageName) {
ajax("/pages/" + pageName, "text").then(function (html) {
newHtml[pageName] = {html: html};
});
});
—
Object.keys(obj)
returns an empty array
— But if I log the object itself... I can clearly see 2 properties
— Is it possible to control webcam in JavaScript
— Yes I believe it is
— Yes...
— You can also control camera light too
— What type is you object???
— Yes, it's possible all functions
— object
—
typeof(obj)
=
object