mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
add support for paths on py-env so that we can load local (sort of) scripts into the environment
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
|
||||
export function addClasses(element: HTMLElement, classes: Array<string>){
|
||||
function addClasses(element: HTMLElement, classes: Array<string>){
|
||||
for (let entry of classes) {
|
||||
element.classList.add(entry);
|
||||
}
|
||||
}
|
||||
|
||||
const getLastPath = function (str) {
|
||||
return str.split('\\').pop().split('/').pop();
|
||||
}
|
||||
|
||||
export {addClasses, getLastPath}
|
||||
Reference in New Issue
Block a user