mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-15 07:14:46 +02:00
Fixed JSEvent
This commit is contained in:
@@ -451,6 +451,8 @@ bool Utility::writeJSEventPlusServerCallback(std::ostream& out, const std::strin
|
|||||||
{
|
{
|
||||||
// rather simple way to support more than one delegate
|
// rather simple way to support more than one delegate
|
||||||
// TODO: there sure is a more efficient way to do this
|
// TODO: there sure is a more efficient way to do this
|
||||||
|
out << "'" << eventName << "':";
|
||||||
|
|
||||||
std::ostringstream invoke;
|
std::ostringstream invoke;
|
||||||
invoke << "invoke:function(" << JS_EVENTARGNAME << "){";
|
invoke << "invoke:function(" << JS_EVENTARGNAME << "){";
|
||||||
out << "{fn:function(" << JS_EVENTARGNAME << "){var all={";
|
out << "{fn:function(" << JS_EVENTARGNAME << "){var all={";
|
||||||
@@ -497,6 +499,7 @@ std::string Utility::createFunctionCode(const std::string& eventName, const std:
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
uri << "'";
|
||||||
// now add the callback code
|
// now add the callback code
|
||||||
std::ostringstream function;
|
std::ostringstream function;
|
||||||
function << "function(" << JS_EVENTARGNAME << "){var uri=" << uri.str() << ";";
|
function << "function(" << JS_EVENTARGNAME << "){var uri=" << uri.str() << ";";
|
||||||
|
Reference in New Issue
Block a user