mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
Remove redundant console.log()
s
This commit is contained in:
parent
cb4cab529a
commit
0705c2919f
@ -111,8 +111,6 @@ logger.info('start -> blocking initialization');
|
|||||||
|
|
||||||
registry_.hooks_on_register.forEach(hook => hook({ cls }));
|
registry_.hooks_on_register.forEach(hook => hook({ cls }));
|
||||||
|
|
||||||
console.log('registered class', id, registry_);
|
|
||||||
|
|
||||||
// Find class that owns 'on_self_registered' hook
|
// Find class that owns 'on_self_registered' hook
|
||||||
let owner = cls;
|
let owner = cls;
|
||||||
while (
|
while (
|
||||||
@ -133,7 +131,6 @@ logger.info('start -> blocking initialization');
|
|||||||
};
|
};
|
||||||
|
|
||||||
scope.use = id => {
|
scope.use = id => {
|
||||||
console.log('use called with id: ', id);
|
|
||||||
if ( id === undefined ) {
|
if ( id === undefined ) {
|
||||||
return registry_.classes_m;
|
return registry_.classes_m;
|
||||||
}
|
}
|
||||||
@ -142,13 +139,6 @@ logger.info('start -> blocking initialization');
|
|||||||
throw new Error(`Class with ID ${id} not registered`);
|
throw new Error(`Class with ID ${id} not registered`);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(
|
|
||||||
'okay it\'s going to return:',
|
|
||||||
registry_.classes_m[id],
|
|
||||||
'and the entire map is this: ',
|
|
||||||
registry_.classes_m
|
|
||||||
)
|
|
||||||
|
|
||||||
return registry_.classes_m[id];
|
return registry_.classes_m[id];
|
||||||
}
|
}
|
||||||
})(globalThis);
|
})(globalThis);
|
||||||
|
@ -37,16 +37,10 @@ export const Component = def(class Component extends HTMLElement {
|
|||||||
|
|
||||||
// Automatically define components for all HTML elements
|
// Automatically define components for all HTML elements
|
||||||
on_other_registered(({ cls }) => {
|
on_other_registered(({ cls }) => {
|
||||||
console.log('detected class', cls.ID);
|
|
||||||
if ( cls.ID === 'ui.component.StepHeading' ) {
|
if ( cls.ID === 'ui.component.StepHeading' ) {
|
||||||
globalThis.sh_shouldbe = cls;
|
globalThis.sh_shouldbe = cls;
|
||||||
console.log(
|
|
||||||
'this is what StepHeading should be',
|
|
||||||
cls
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if ( globalThis.lib.is_subclass(cls, HTMLElement) ) {
|
if ( globalThis.lib.is_subclass(cls, HTMLElement) ) {
|
||||||
console.log('registering as an element');
|
|
||||||
defineComponent(cls);
|
defineComponent(cls);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -222,9 +216,6 @@ export const defineComponent = (component) => {
|
|||||||
// TODO: This is necessary because files can be loaded from
|
// TODO: This is necessary because files can be loaded from
|
||||||
// both `/src/UI` and `/UI` in the URL; we need to fix that
|
// both `/src/UI` and `/UI` in the URL; we need to fix that
|
||||||
if ( customElements.get(name) ) return;
|
if ( customElements.get(name) ) return;
|
||||||
|
|
||||||
// console.log('[surely] defining', name, 'as', component);
|
|
||||||
|
|
||||||
customElements.define(name, component);
|
customElements.define(name, component);
|
||||||
component.defined_as = name;
|
component.defined_as = name;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user