@github/catalyst
Advanced tools
Comparing version 1.1.2 to 1.1.3
export declare function bind(controller: HTMLElement): void; | ||
export declare function bindShadow(root: ShadowRoot): void; | ||
/** | ||
@@ -3,0 +4,0 @@ * Set up observer that will make sure any actions that are dynamically |
@@ -8,9 +8,11 @@ const controllers = new WeakSet(); | ||
controllers.add(controller); | ||
if (controller.shadowRoot) { | ||
bindElements(controller.shadowRoot); | ||
listenForBind(controller.shadowRoot); | ||
} | ||
if (controller.shadowRoot) | ||
bindShadow(controller.shadowRoot); | ||
bindElements(controller); | ||
listenForBind(controller.ownerDocument); | ||
} | ||
export function bindShadow(root) { | ||
bindElements(root); | ||
listenForBind(root); | ||
} | ||
const observers = new WeakMap(); | ||
@@ -17,0 +19,0 @@ /** |
import { register } from './register.js'; | ||
import { bind } from './bind.js'; | ||
import { bind, bindShadow } from './bind.js'; | ||
import { autoShadowRoot } from './auto-shadow-root.js'; | ||
@@ -17,5 +17,7 @@ import { defineObservedAttributes, initializeAttrs } from './attr.js'; | ||
initializeAttrs(this); | ||
bind(this); | ||
if (connect) | ||
connect.call(this); | ||
bind(this); | ||
if (this.shadowRoot) | ||
bindShadow(this.shadowRoot); | ||
}; | ||
@@ -22,0 +24,0 @@ defineObservedAttributes(classObject); |
{ | ||
"name": "@github/catalyst", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Helpers for creating HTML Elements as Controllers", | ||
@@ -27,5 +27,3 @@ "homepage": "https://github.github.io/catalyst", | ||
"build": "tsc --build", | ||
"build:docs": "npm run build:docs:reference && npm run build:docs:jekyll", | ||
"build:docs:jekyll": "cd docs && JEKYLL_ENV=production bundle exec jekyll build", | ||
"build:docs:reference": "mkdir -p docs/_data && typedoc src/index.ts --json docs/_data/reference.json", | ||
"build:docs": "cd docs && JEKYLL_ENV=production bundle exec jekyll build", | ||
"clean": "tsc --build --clean", | ||
@@ -55,5 +53,4 @@ "lint": "eslint . --ignore-path .gitignore", | ||
"tslib": "^2.1.0", | ||
"typedoc": "^0.20.28", | ||
"typescript": "^4.2.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
40781
17
44
660