On Sunday, 2012-12-09, Sebastian Kügler wrote: > Hi Renato, > > On Saturday, December 08, 2012 21:15:07 renato fringuello wrote: > > Can I use jQuery framework in html/js plasmoids? How can I do it? > > I don't know any details about jQuery, but can give you some hints: If > jQuery uses the webbrowser's DOM, that's not available in QML, QML only > supports ECMA Script, which is a subset of the JavaScript usually > available in webbrowsers.
In theory my guess would be that it should be possible to use non-browser parts, e.g. the wrappers around HttpXmlRequest. Since JavaScript only needs the symbols that are actually used in executed code paths, not having DOM symbols shouldn't effect those other parts. However, jQuery being designed to run across many browsers with different JavaScript APIs, will use the existance or absence of certain objects or functions as indicators which browser it is currently being executed in. So it is likely necessary to examine how it usually determines that it is running inside the JavaScriptCore [1] version that is being used by QML and then provide those objects/functions/values in the context used by jQuery. Cheers, Kevin [1] QML in Qt5 uses V8, but I think in Qt4 it is using then same engine which also powers QtScript and this is a copy/fork of some JavaScriptCore version if I remember correctly. -- Kevin Krammer, KDE developer, xdg-utils developer KDE user support, developer mentoring
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel