Changeset 23546 in webkit
- Timestamp:
- Jun 14, 2007 7:51:14 PM (17 years ago)
- Location:
- trunk/WebKitQt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitQt/Api/qwebframe.cpp
r23545 r23546 49 49 #include "bindings/runtime.h" 50 50 #include "bindings/runtime_root.h" 51 #include "kjs_proxy.h" 52 #include "kjs_binding.h" 51 53 #include "ExecState.h" 52 54 #include "object.h" … … 390 392 } 391 393 394 QString QWebFrame::evaluateJavaScript(const QString& scriptSource) 395 { 396 KJSProxy *proxy = d->frame->scriptProxy(); 397 QString rc; 398 if (proxy) { 399 KJS::JSValue *v = proxy->evaluate(String(), 0, scriptSource, d->frame->document()); 400 if (v) { 401 rc = String(v->toString(proxy->interpreter()->globalExec())); 402 } 403 } 404 return rc; 405 } 406 392 407 /*!\reimp 393 408 */ -
trunk/WebKitQt/Api/qwebframe.h
r23545 r23546 57 57 QList<QWebFrame*> childFrames() const; 58 58 59 public Q_SLOTS: 60 QString evaluateJavaScript(const QString& scriptSource); 61 59 62 signals: 60 63 void cleared(); -
trunk/WebKitQt/ChangeLog
r23545 r23546 1 2007-06-14 George Staikos <staikos@kde.org> 2 3 Reviewed by Lars. 4 5 Add evaluateJavaScript() method. 6 7 * Api/qwebframe.cpp: 8 (QWebFrame::evaluateJavaScript): 9 * Api/qwebframe.h: 10 1 11 2007-06-14 George Staikos <staikos@kde.org> 2 12
Note: See TracChangeset
for help on using the changeset viewer.