|
|
|
@ -127,11 +127,7 @@ export default class WindowWrapper extends Wrapper {
|
|
|
|
|
|
|
|
|
|
component.partly_hoisted.push(b`
|
|
|
|
|
function ${id}() {
|
|
|
|
|
${props.map(prop =>
|
|
|
|
|
prop.name[0] === '$'
|
|
|
|
|
? b`${prop.name.slice(1)}.set(${prop.name} = @_window.${prop.value});`
|
|
|
|
|
: b`$$invalidate('${prop.name}', ${prop.name} = @_window.${prop.value});`
|
|
|
|
|
)}
|
|
|
|
|
${props.map(prop => component.invalidate(prop.name, x`${prop.name} = @_window.${prop.value}`))}
|
|
|
|
|
}
|
|
|
|
|
`);
|
|
|
|
|
|
|
|
|
@ -169,11 +165,9 @@ export default class WindowWrapper extends Wrapper {
|
|
|
|
|
referenced: true
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const invalidate = name[0] === '$' ? b`${name.slice(1)}.set(${name} = @_navigator.onLine)` : b`$$invalidate('${name}', ${name} = @_navigator.onLine);`;
|
|
|
|
|
|
|
|
|
|
component.partly_hoisted.push(b`
|
|
|
|
|
function ${id}() {
|
|
|
|
|
${invalidate}
|
|
|
|
|
${component.invalidate(name, x`${name} = @_navigator.onLine`)}
|
|
|
|
|
}
|
|
|
|
|
`);
|
|
|
|
|
|
|
|
|
|