Select Git revision
digest_test.go
-
Will McCutchen authoredWill McCutchen authored
datasource.mjs 807 B
/**
* Copyright schukai GmbH and contributors 2023. All Rights Reserved.
* Node module: @schukai/monster
* This file is licensed under the AGPLv3 License.
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
*/
import { addAttributeToken } from "../../../dom/attributes.mjs";
import { ATTRIBUTE_ERRORMESSAGE } from "../../../dom/constants.mjs";
export { DatasourceStyleSheet };
/**
* @private
* @type {CSSStyleSheet}
*/
const DatasourceStyleSheet = new CSSStyleSheet();
try {
DatasourceStyleSheet.insertRule(
`
@layer datasource {
:host{display:none}:host(.intersection-observer){display:block;height:1px;overflow:hidden;width:1px}
}`,
0,
);
} catch (e) {
addAttributeToken(
document.getRootNode().querySelector("html"),
ATTRIBUTE_ERRORMESSAGE,
e + "",
);
}