mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
This MR brings in `$`, `$$`, and `$x` browsers devtools' utilities to our code so we can use these whenever we find it convenient.
This commit is contained in:
committed by
GitHub
parent
3a66be585f
commit
82613d016a
@@ -1,3 +1,5 @@
|
||||
import { $$ } from 'basic-devtools';
|
||||
|
||||
import './styles/pyscript_base.css';
|
||||
|
||||
import { loadConfigFromElement } from './pyconfig';
|
||||
@@ -150,7 +152,7 @@ export class PyScriptApp {
|
||||
// XXX: we should actively complain if there are multiple <py-config>
|
||||
// and show a big error. PRs welcome :)
|
||||
logger.info('searching for <py-config>');
|
||||
const elements = document.getElementsByTagName('py-config');
|
||||
const elements = $$('py-config', document);
|
||||
let el: Element | null = null;
|
||||
if (elements.length > 0) el = elements[0];
|
||||
if (elements.length >= 2) {
|
||||
|
||||
Reference in New Issue
Block a user