100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.

0 downloads

dbbasic-web-native/debug-disclosure.py
Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-web-native.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-web-native.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-web-native.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add canonical.html v1.0 - The single source of truth for usability standards fb6e650 1 year ago History
debug-disclosure.py · 876 bytes · 23 lines
1from playwright.sync_api import sync_playwright
2
3with sync_playwright() as p:
4 browser = p.chromium.launch()
5 page = browser.new_page()
6 page.goto('file:///Users/danq/dbbasic-web-native/test-disclosure.html')
7 page.wait_for_timeout(1000)
8
9 result = page.evaluate('''
10 () => {
11 const disclosure = document.querySelector('semantic-disclosure');
12 const disclosureItems = disclosure.querySelectorAll('disclosure-item');
13 const container = disclosure.shadowRoot.querySelector('.disclosure-container');
14 return {
15 disclosureItemsFound: disclosureItems.length,
16 containerChildren: container ? container.children.length : 0,
17 containerHTML: container ? container.innerHTML.substring(0, 200) : 'null'
18 };
19 }
20 ''')
21
22 print(result)
23 browser.close()