Comments (5)
You can execute arbitrary javascript on webpages, use
Browser->GetMainFrame()->ExecuteJavascript("document.getElementById('lst-ib').va
lue='my search';")
Original comment by [email protected]
on 9 Nov 2012 at 3:13
from cefpython.
Original comment by [email protected]
on 9 Nov 2012 at 3:14
- Changed state: Duplicate
from cefpython.
could you show on this example:
# An example of embedding CEF in wxPython application.
#coding:utf-8
import wx
import sys
import time
import cefpython
# TODO: currently we use wx.Timer to imitate message loop, but
# it would probably be better to use wx.CallLater() and wx.lib.pubsub.
class MainFrame(wx.Frame):
browser = None
def __init__(self):
wx.Frame.__init__(self, parent=None, id=wx.ID_ANY, title='wxPython example', size=(1000,800))
self.CreateMenu()
self.browser = cefpython.CreateBrowser(self.GetHandle(), browserSettings={}, navigateURL="http://google.com")
self.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
self.Bind(wx.EVT_SIZE, self.OnSize)
def CreateMenu(self):
filemenu = wx.Menu()
filemenu.Append(1, "Открыть")
filemenu.Append(2, "Выход")
aboutmenu = wx.Menu()
aboutmenu.Append(1, "CEF Python")
menubar = wx.MenuBar()
menubar.Append(filemenu,"&File")
menubar.Append(aboutmenu, "&About")
self.SetMenuBar(menubar)
def OnSetFocus(self, event):
cefpython.wm_SetFocus(self.GetHandle(), 0, 0, 0)
def OnSize(self, event):
cefpython.wm_Size(self.GetHandle(), 0, 0, 0)
class MyApp(wx.App):
timer = None
timerID = 1
def OnInit(self):
cefpython.Initialize()
sys.excepthook = cefpython.ExceptHook
self.timer = wx.Timer(self, self.timerID)
self.timer.Start(10) # 10ms
wx.EVT_TIMER(self, self.timerID, self.OnTimer)
frame = MainFrame()
self.SetTopWindow(frame)
frame.Show()
return True
def OnExit(self):
self.timer.Stop()
cefpython.Shutdown()
def OnTimer(self, event):
cefpython.SingleMessageLoop()
if __name__ == '__main__':
print('wx.version=%s' % wx.version())
app = MyApp(False)
app.MainLoop()
print list(sys.modules.keys())
Original comment by [email protected]
on 12 Nov 2012 at 6:58
from cefpython.
This is an issue tracker where you report bugs or feature requests, this is not
a help forum.
Original comment by [email protected]
on 13 Nov 2012 at 12:27
from cefpython.
Project will move to Github. Find this issue at the new address (soon):
https://github.com/cztomczak/cefpython/issues/23
Original comment by [email protected]
on 24 Aug 2015 at 6:25
from cefpython.
Related Issues (20)
- The default en-US locale pak file fails to load on Mac HOT 7
- Examples crash on Mac when app doesn't have permission to write to the debug.log file HOT 2
- Issues with size_t => int conversions when using cef_values.h API on Win x64 platform HOT 3
- Python Wheels - DESCRIPTION.rst UNKNOWN HOT 1
- Embed __version__ also in the cython generated module (cefpython_py27.pyd) HOT 2
- Create unified key mappings for all platforms HOT 9
- Add Browser.IsDevTools() HOT 2
- Expose CreateBrowser() with a callback argument that will be executed after browser was created HOT 2
- The popup window and parent window can't script each other in the wxpython.py example HOT 4
- Create "chrome31" branch before updating to a newer CEF branch HOT 2
- wxpython-response.py example: final url is wrong when doing redirects HOT 8
- Close the browser BEFORE the page is full loaded CEF Crashe HOT 1
- Warnings on OS X: Internals of CFAllocator not known HOT 2
- [meta] Migrate the repository somewhere HOT 2
- Gtk: gtk_disable_setlocale() must be called before gtk_init() HOT 3
- Restructure directories (binaries, installer, libraries) to allow for git branching HOT 2
- Automating navigation HOT 1
- Google Code is dying HOT 1
- Update to CEF branch 2171 (Chrome 39) HOT 2
- Ability to pass modifiers to SendMouseMoveEvent and similar HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cefpython.