Skip to content

Commit 7667e50

Browse files
committed
fix: Small fixes to custom element classes; Increment workflow to Node.js 24
1 parent 6aa37b6 commit 7667e50

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Deploy
55
on: [push, pull_request]
66
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
77
env:
8-
NODE_VERSION: 20
8+
NODE_VERSION: 24
99
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1010
permissions:
1111
contents: read

src/components/MyFeedElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class MyFeedElement extends HTMLElement {
104104
const req = this.#createRequest();
105105
const resp = await fetch(req);
106106
if (!resp.ok) {
107-
throw new Error(`MyFeedElement (fetch): ${resp.status} ~ ${uri}`);
107+
throw new Error(`MyFeedElement (fetch): ${resp.status} ~ ${resp.url}`);
108108
}
109109
const data = await resp.json();
110110

src/components/MySearchElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class MySearchElement extends window.HTMLElement {
1313
get cx () {
1414
const CX = this.getAttribute('cx'); // || '001222343498871500969:-u73i2qfu2s';
1515
console.assert(CX, '"cx" - Required attribute');
16-
return CX;
16+
return CX || undefined;
1717
}
1818

1919
get label () { return this.getAttribute('label') || 'Search'; }

src/components/MyYoutubeEmbedElement.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
const { HTMLElement } = window;
32

43
/**
@@ -52,7 +51,6 @@ export class MyYoutubeEmbedElement extends HTMLElement {
5251
_onYouTubeIframeAPIReady (playerElem) {
5352
window.onYouTubeIframeAPIReady = () => {
5453
const { YT } = window;
55-
console.debug('onYouTubeIframeAPIReady:', YT.PlayerState, YT);
5654
this._player = new YT.Player(playerElem, {
5755
height: this.height,
5856
width: this.width,
@@ -65,6 +63,8 @@ export class MyYoutubeEmbedElement extends HTMLElement {
6563
onStateChange: (ev) => this._onPlayerStateChange(ev)
6664
}
6765
});
66+
console.debug('onYouTubeIframeAPIReady:', this._player, YT.PlayerState, YT);
67+
this.dataset.ready = true;
6868
};
6969
}
7070

@@ -81,6 +81,7 @@ export class MyYoutubeEmbedElement extends HTMLElement {
8181
// target.setPlaybackRate(2);
8282
const RATE = target.getPlaybackRate();
8383
console.debug('onPlayerReady:', RATE, videoId, ev);
84+
this.dataset.ready = true;
8485
}
8586

8687
_onPlayerStateChange (ev) {

0 commit comments

Comments
 (0)