mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 07:21:05 +00:00
commit
154b240b20
22
.circleci/config.yml
Normal file
22
.circleci/config.yml
Normal file
@ -0,0 +1,22 @@
|
||||
version: 2.1
|
||||
|
||||
commands:
|
||||
|
||||
orbs:
|
||||
browser-tools: circleci/browser-tools@1.1.0
|
||||
jobs:
|
||||
test:
|
||||
docker:
|
||||
- image: cimg/node:16.13.1-browsers
|
||||
steps:
|
||||
- browser-tools/install-browser-tools
|
||||
- checkout
|
||||
- run: |
|
||||
node --version
|
||||
java --version
|
||||
google-chrome --version
|
||||
|
||||
workflows:
|
||||
tests-containers:
|
||||
jobs:
|
||||
- test
|
@ -41,6 +41,7 @@
|
||||
"fs-extra": "^9.1.0",
|
||||
"mocha": "^7.2.0",
|
||||
"mocha-chrome": "^2.2.0",
|
||||
"mocha-webdriver-runner": "^0.6.3",
|
||||
"sass": "^1.34.0",
|
||||
"sinon": "^9.2.4",
|
||||
"typescript": "^4.3.5",
|
||||
|
10
src/htmx.js
10
src/htmx.js
@ -248,9 +248,13 @@ return (function () {
|
||||
return elemTop < window.innerHeight && elemBottom >= 0;
|
||||
}
|
||||
|
||||
function bodyContains(elt) {
|
||||
return getDocument().body.contains(elt);
|
||||
}
|
||||
function bodyContains(elt) {
|
||||
if (elt.getRootNode() instanceof ShadowRoot) {
|
||||
return getDocument().body.contains(elt.getRootNode().host);
|
||||
} else {
|
||||
return getDocument().body.contains(elt);
|
||||
}
|
||||
}
|
||||
|
||||
function splitOnWhitespace(trigger) {
|
||||
return trigger.trim().split(/\s+/);
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
<script src="../node_modules/chai/chai.js"></script>
|
||||
<script src="../node_modules/mocha/mocha.js"></script>
|
||||
<script src="../node_modules/mocha-webdriver-runner/dist/mocha-webdriver-client.js"></script>
|
||||
<script src="../node_modules/sinon/pkg/sinon.js"></script>
|
||||
<script src="../src/htmx.js"></script>
|
||||
<script class="mocha-init">
|
||||
|
Loading…
x
Reference in New Issue
Block a user