Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f5fd0662d3 | |||
14c91ed81f |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@designestate/dees-domtools",
|
||||
"version": "1.0.99",
|
||||
"version": "1.0.100",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@designestate/dees-domtools",
|
||||
"version": "1.0.99",
|
||||
"version": "1.0.100",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest": "^1.0.65",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-domtools",
|
||||
"version": "1.0.99",
|
||||
"version": "1.0.100",
|
||||
"private": false,
|
||||
"description": "tools to simplify complex css structures",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@ -110,6 +110,7 @@ export class DomTools {
|
||||
|
||||
private runOnceTrackerStringMap = new Stringmap();
|
||||
private runOnceResultMap = new FastMap();
|
||||
|
||||
/**
|
||||
* run a function once and always get the Promise of the first execution
|
||||
* @param identifierArg the indentifier arg identifies functions. functions with the same identifier are considered equal
|
||||
@ -135,7 +136,10 @@ export class DomTools {
|
||||
}
|
||||
|
||||
// setStuff
|
||||
|
||||
/**
|
||||
* allows to set global styles
|
||||
* @param stylesText the css text you want to set
|
||||
*/
|
||||
public async setGlobalStyles(stylesText: string) {
|
||||
await this.domReady.promise;
|
||||
const styleElement = document.createElement('style');
|
||||
@ -144,6 +148,10 @@ export class DomTools {
|
||||
this.elements.headElement.appendChild(styleElement);
|
||||
}
|
||||
|
||||
/**
|
||||
* allows setting external css files
|
||||
* @param cssLinkArg a url to an external stylesheet
|
||||
*/
|
||||
public async setExternalCss(cssLinkArg: string) {
|
||||
const cssTag = document.createElement('link');
|
||||
cssTag.rel = 'stylesheet';
|
||||
@ -152,8 +160,10 @@ export class DomTools {
|
||||
document.head.append(cssTag);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* allows setting of website infos
|
||||
* @param optionsArg the website info
|
||||
*/
|
||||
public async setWebsiteInfo(optionsArg: plugins.websetup.IWebSetupConstructorOptions) {
|
||||
await this.websetup.setup(optionsArg);
|
||||
await this.websetup.readyPromise;
|
||||
|
@ -5,7 +5,7 @@ import { DomTools } from './domtools.classes.domtools';
|
||||
*/
|
||||
export const scrollBarStyles = (() => {
|
||||
const returnStyles =
|
||||
navigator.userAgent.indexOf('Windows') !== -1
|
||||
navigator.userAgent.indexOf('Mac OS X') !== -1
|
||||
? `
|
||||
/* width */
|
||||
::-webkit-scrollbar {
|
||||
|
Reference in New Issue
Block a user