mirror of
https://github.com/MercuryWorkshop/dreamlandjs.git
synced 2025-05-15 15:10:02 -04:00
chore: format
This commit is contained in:
parent
7de25670a0
commit
19ea5759df
2 changed files with 3 additions and 4 deletions
|
@ -439,7 +439,6 @@ export function h(type, props, ...children) {
|
||||||
|
|
||||||
// glue for nested children
|
// glue for nested children
|
||||||
function JSXAddChild(child, cb) {
|
function JSXAddChild(child, cb) {
|
||||||
|
|
||||||
let childchild, elms, node
|
let childchild, elms, node
|
||||||
if (isDLPtr(child)) {
|
if (isDLPtr(child)) {
|
||||||
JSXAddFixedWrapper(child, cb)
|
JSXAddFixedWrapper(child, cb)
|
||||||
|
|
|
@ -5,7 +5,7 @@ export const cssmap = {}
|
||||||
/* POLYFILL.SCOPE.START */
|
/* POLYFILL.SCOPE.START */
|
||||||
let scopeSupported
|
let scopeSupported
|
||||||
function checkScopeSupported() {
|
function checkScopeSupported() {
|
||||||
if (scopeSupported) return true;
|
if (scopeSupported) return true
|
||||||
const style = document.createElement('style')
|
const style = document.createElement('style')
|
||||||
style.textContent = '@scope (.test) { :scope { color: red } }'
|
style.textContent = '@scope (.test) { :scope { color: red } }'
|
||||||
document.head.appendChild(style)
|
document.head.appendChild(style)
|
||||||
|
@ -19,7 +19,7 @@ function checkScopeSupported() {
|
||||||
document.body.removeChild(testElement)
|
document.body.removeChild(testElement)
|
||||||
|
|
||||||
scopeSupported = computedColor == 'rgb(255, 0, 0)'
|
scopeSupported = computedColor == 'rgb(255, 0, 0)'
|
||||||
return scopeSupported;
|
return scopeSupported
|
||||||
}
|
}
|
||||||
const depth = 50
|
const depth = 50
|
||||||
// polyfills @scope for firefox and older browsers, using a :not selector recursively increasing in depth
|
// polyfills @scope for firefox and older browsers, using a :not selector recursively increasing in depth
|
||||||
|
@ -61,7 +61,7 @@ function parseCombinedCss(str) {
|
||||||
|
|
||||||
// compat layer for older browsers. when css nesting stablizes this can be removed
|
// compat layer for older browsers. when css nesting stablizes this can be removed
|
||||||
str += '\n'
|
str += '\n'
|
||||||
for (; ;) {
|
for (;;) {
|
||||||
let [first, ...rest] = str.split('\n')
|
let [first, ...rest] = str.split('\n')
|
||||||
if (first.trim().endsWith('{')) break
|
if (first.trim().endsWith('{')) break
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue