MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / StyleSheet

Function StyleSheet

code/styling/public/app.js:20664–20695  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20662 /* children (aka clones) of this StyleSheet inheriting all and future injections */
20663
20664 function StyleSheet() {
20665 var _this = this;
20666
20667 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
20668 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
20669 classCallCheck(this, StyleSheet);
20670
20671 this.getImportRuleTag = function () {
20672 var importRuleTag = _this.importRuleTag;
20673
20674 if (importRuleTag !== undefined) {
20675 return importRuleTag;
20676 }
20677
20678 var firstTag = _this.tags[0];
20679 var insertBefore = true;
20680
20681 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
20682 };
20683
20684 this.id = sheetRunningId += 1;
20685 this.sealed = false;
20686 this.forceServer = forceServer;
20687 this.target = forceServer ? null : target;
20688 this.tagMap = {};
20689 this.deferred = {};
20690 this.rehydratedNames = {};
20691 this.ignoreRehydratedNames = {};
20692 this.tags = [];
20693 this.capacity = 1;
20694 this.clones = [];
20695 }
20696
20697 /* rehydrate all SSR'd style tags */
20698

Callers

nothing calls this directly

Calls 2

classCallCheckFunction · 0.85
makeTagFunction · 0.85

Tested by

no test coverage detected