-
-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support of Element.nextElementSibling and Element.previousEleme… (
#569) * Added support of Element.nextElementSibling and Element.previousElementSibling * Fixed linting issues * Removed reedundant logger use
- Loading branch information
Showing
12 changed files
with
175 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<title>Ferret E2E SPA</title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<link rel="stylesheet" href="./assets/bootstrap.min.css" crossorigin="anonymous"> | ||
</head> | ||
<body class="text-center"> | ||
<div id="root"><div id="layout"><nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4" id="navbar"><a class="navbar-brand active" aria-current="page" href="http://localhost:8080/#/">Ferret</a><button class="navbar-toggler" type="button"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse"><ul class="navbar-nav mr-auto"><li class="nav-item"><a class="nav-link" href="http://localhost:8080/#/forms">Forms</a></li><li class="nav-item"><a class="nav-link" href="http://localhost:8080/#/navigation">Navigation</a></li><li class="nav-item"><a class="nav-link" href="http://localhost:8080/#/events">Events</a></li><li class="nav-item"><a class="nav-link" href="http://localhost:8080/#/iframe">iFrame</a></li></ul></div></nav><main class="container"><div id="tracks"><ul class="list-group track-list"><li class="list-group-item track" data-index="0"><div class="track-details"><h5 class="track-artist">Lil Tecca</h5><small class="track-name">Ransom</small></div></li><li class="list-group-item track" data-index="1"><div class="track-details"><h5 class="track-artist">NLE Choppa</h5><small class="track-name">Shotta Flow (Feat. Blueface) [Remix]</small></div></li><li class="list-group-item track" data-index="2"><div class="track-details"><h5 class="track-artist">Baby Jesus (DaBaby)</h5><small class="track-name">Suge</small></div></li><li class="list-group-item track" data-index="3"><div class="track-details"><h5 class="track-artist">NLE Choppa</h5><small class="track-name">Shotta Flow 3</small></div></li><li class="list-group-item track" data-index="4"><div class="track-details"><h5 class="track-artist">Lil Tecca </h5><small class="track-name">Lil Tecca - Did It Again</small></div></li><li class="list-group-item track" data-index="5"><div class="track-details"><h5 class="track-artist">NLE Choppa</h5><small class="track-name">Shotta Flow</small></div></li><li class="list-group-item track" data-index="6"><div class="track-details"><h5 class="track-artist">Ynw Melly</h5><small class="track-name">Dangerously In Love (772 Love Pt. 2)</small></div></li><li class="list-group-item track" data-index="7"><div class="track-details"><h5 class="track-artist">POLO G</h5><small class="track-name">Polo G feat. Lil TJay - Pop Out</small></div></li><li class="list-group-item track" data-index="8"><div class="track-details"><h5 class="track-artist">MUSTARD</h5><small class="track-name">Ballin' (feat. Roddy Ricch)</small></div></li><li class="list-group-item track" data-index="9"><div class="track-details"><h5 class="track-artist">Lil Nas X</h5><small class="track-name">Panini</small></div></li><li class="list-group-item track" data-index="10"><div class="track-details"><h5 class="track-artist">Juice WRLD</h5><small class="track-name">Juice Wrld - RUN</small></div></li><li class="list-group-item track" data-index="11"><div class="track-details"><h5 class="track-artist">Shordie Shordie</h5><small class="track-name">Betchua (Bitchuary)</small></div></li><li class="list-group-item track" data-index="12"><div class="track-details"><h5 class="track-artist">Post Malone</h5><small class="track-name">Goodbyes (feat. Young Thug)</small></div></li><li class="list-group-item track" data-index="13"><div class="track-details"><h5 class="track-artist">LIL UZI VERT</h5><small class="track-name">Sanguine Paradise</small></div></li><li class="list-group-item track" data-index="14"><div class="track-details"><h5 class="track-artist">Calboy</h5><small class="track-name">Envy Me</small></div></li><li class="list-group-item track" data-index="15"><div class="track-details"><h5 class="track-artist">Ambjaay</h5><small class="track-name">Uno</small></div></li><li class="list-group-item track" data-index="16"><div class="track-details"><h5 class="track-artist">Lil Tecca</h5><small class="track-name">Lil Tecca - Bossanova</small></div></li><li class="list-group-item track" data-index="17"><div class="track-details"><h5 class="track-artist">Lil Baby</h5><small class="track-name">Baby</small></div></li><li class="list-group-item track" data-index="18"><div class="track-details"><h5 class="track-artist">Lil Tjay</h5><small class="track-name">Lil Tjay - Brothers (Prod by JDONTHATRACK & Protegebeatz)</small></div></li><li class="list-group-item track" data-index="19"><div class="track-details"><h5 class="track-artist">YK Osiris</h5><small class="track-name">Worth It</small></div></li></ul></div></main></div></div> | ||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
LET doc = DOCUMENT(@lab.cdn.dynamic + "/#/lists", { driver:"cdp" }) | ||
|
||
LET current = ELEMENT(doc, ".track") | ||
T::NOT::NONE(current) | ||
LET next = current.nextElementSibling | ||
T::NOT::NONE(next) | ||
|
||
LET currentIdx = TO_INT(current.attributes['data-index']) | ||
LET nextIdx = TO_INT(next.attributes['data-index']) | ||
T::GT(nextIdx, currentIdx) | ||
|
||
RETURN NONE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
LET doc = DOCUMENT(@lab.cdn.dynamic + "/#/lists", { driver:"cdp" }) | ||
|
||
LET current = ELEMENT(doc, '[data-index="1"]') | ||
T::NOT::NONE(current) | ||
LET prev = current.previousElementSibling | ||
T::NOT::NONE(prev) | ||
|
||
LET currentIdx = TO_INT(current.attributes['data-index']) | ||
LET prevIdx = TO_INT(prev.attributes['data-index']) | ||
T::LT(prevIdx, currentIdx) | ||
|
||
RETURN NONE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
LET url = @lab.cdn.static + '/list.html' | ||
LET doc = DOCUMENT(url) | ||
|
||
LET current = ELEMENT(doc, ".track") | ||
T::NOT::NONE(current) | ||
LET next = current.nextElementSibling.nextElementSibling | ||
T::NOT::NONE(next) | ||
|
||
LET currentIdx = TO_INT(current.attributes['data-index']) | ||
LET nextIdx = TO_INT(next.attributes['data-index']) | ||
T::GT(nextIdx, currentIdx) | ||
|
||
RETURN NONE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
LET url = @lab.cdn.static + '/list.html' | ||
LET doc = DOCUMENT(url) | ||
|
||
LET current = ELEMENT(doc, '[data-index="1"]') | ||
T::NOT::NONE(current) | ||
LET prev = current.previousElementSibling | ||
T::NOT::NONE(prev) | ||
|
||
LET currentIdx = TO_INT(current.attributes['data-index']) | ||
LET prevIdx = TO_INT(prev.attributes['data-index']) | ||
T::LT(prevIdx, currentIdx) | ||
|
||
RETURN NONE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package templates | ||
|
||
const getPreviousElementSibling = "(el) => el.previousElementSibling" | ||
const getNextElementSibling = "(el) => el.nextElementSibling" | ||
|
||
func GetPreviousElementSibling() string { | ||
return getPreviousElementSibling | ||
} | ||
|
||
func GetNextElementSibling() string { | ||
return getNextElementSibling | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters