IntroductionInstallationLimitations of the "file" protocolFrequently asked questionsSyntax, keywords and built-in functionsStandard distributionimport implementationBrython packagesBrowser interface
Introduction - DOM API
Creating a document Accessing elements Attributes, properties and methods Events Mouse events Keyboard events Focus events Drag events Query string Interactions with Javascript Brython-specific built-in modules
browser
browser.aio browser.ajax browser.html browser.local_storage browser.markdown browser.object_storage browser.session_storage browser.svg browser.template browser.timer browser.webcomponent browser.websocket browser.worker Widgets browser.widgets.dialog browser.widgets.menu interpreter javascript Working with BrythonCookbook |
ProblemUse the basic HTML markup : bold, italic, headers...Solution
B is a function defined in the module browser.html , matching the HTML tag
<B> (bold)
B("text") returns an object matching the HTML <b>text</b>
All HTML tags have their own function : I, H1, H2,... . You can nest
functions, as shown in the second line :
document <= html.H4(html.I("Python in the browser")) |