Repository navigation
domonic 1.9.0
Fixes as results of WPT conformance in Chromonic
Highlights
- Forms and links navigate. In a
Window,form.submit(),requestSubmit()anda.click()load the next page.document.cookieandcookieStoreshare the window's cookie jar, andwindow.fetchis the page's fetch. awaitworks.await win.fetch(url), or await anyPromise.- Requests look like a browser's. The window sends
navigator.userAgent,AcceptandAccept-Language(fromnavigator.languages). Setnavigator.userAgentto change it. setHTML()and the Sanitizer are fixed. They use the real HTML parser, soTom & JerrystaysTom & Jerry, and their output can't run script when a browser re-reads it. Tested against known sanitizer bypasses.innerTextis the rendered text, as in a browser, and it's now a property.- More of the HTML APIs:
- attributes as typed properties (
img.alt,input.required,td.colSpan, ...); - the table API (
rows,tBodies,insertRow,cells); - form controls (
valueAsNumber,stepUp, the selection API,labels,<output>,<progress>,<meter>); <audio>/<video>playback state;<dialog>modal state andreturnValue;ElementInternals,moveBefore,checkVisibility;document.location.
- attributes as typed properties (
- CSS:
- nesting,
revertandrevert-layer, and logical properties; min(),max(),clamp(), nestedcalc()and viewport units;hwb(),light-dark()and system colours;- Media Queries 4;
- the
grid,border-imageandallshorthands; - many computed-value fixes.
- nesting,
- Selectors:
:is(),:where()and:not()take complex selectors, and:has()takes any relative selector;:scopeworks;- the attribute
iflag works; - pseudo-classes can come before a class (
li:nth-child(2).x).
- Deeply nested pages no longer crash. Cloning,
innerHTML,textContent,innerText,TreeWalkerand XPath work thousands of levels deep. - One dependency fewer: cssselect is gone.
Changes you may notice
innerHTMLandouterHTMLescape<and>inside attribute values, as Chrome 138+ and Firefox 140+ do.<noscript>text is escaped too.str()writes only real boolean attributes without a value:value=""now prints asvalue="".- A
Window's requests sendnavigator.userAgent, notpython-requests/.... localStorageandsessionStorageare kept per site.- A new
Windowstarts onabout:blank. - Reading
element.styleno longer rewrites thestyleattribute. Date(ms)takes milliseconds, andDate()has no time-zone offset.querySelectorAll(":contains(...)")no longer matches. It came from cssselect, and browsers reject it. Use BeautifulSlop'sselect(":-soup-contains(...)")instead.
BeautifulSlop
select()supports:-soup-contains(),:-soup-contains-own()and:contains().find("html"),select("html")andfind_all(True)include the page's<html>. A soup made from one top-level element can find that element.limit=0means no limit, as in Beautiful Soup.
Full Changelog: 1.8.5...1.9.0