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

0 downloads

dbbasic-web-native/debug-tabs.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-tabs.py · 965 bytes · 26 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-tabs.html')
7 page.wait_for_timeout(1000)
8
9 result = page.evaluate('''
10 () => {
11 const tabs = document.querySelector('semantic-tabs');
12 const tabItems = tabs.querySelectorAll('tab-item');
13 const tabPanels = tabs.querySelectorAll('tab-panel');
14 const tabList = tabs.shadowRoot.querySelector('.tab-list');
15 const panelsContainer = tabs.shadowRoot.querySelector('.tab-panels');
16 return {
17 tabItemsFound: tabItems.length,
18 tabPanelsFound: tabPanels.length,
19 tabListChildren: tabList.children.length,
20 panelsContainerChildren: panelsContainer.children.length
21 };
22 }
23 ''')
24
25 print(result)
26 browser.close()