Skip to content

Commit

Permalink
Fullscreen component: make it more clear it needs a selector attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
nboisteault committed Dec 4, 2023
1 parent 9e7d8cd commit fe7b992
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/src/components/FullScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default class FullScreen extends HTMLElement {
// Get element selector
const selector = this.getAttribute('selector');
if (!selector) {
console.log('A selector must be provided');
console.warn('Fullscreen: a selector must be provided as an attribute for the element to work.');
return;
}

this._elementFullscreened = document.querySelector(selector);
if (!this._elementFullscreened) {
console.log('The selected element does not exist');
console.warn('Fullscreen: the selected element does not exist.');
return;
}

Expand Down

0 comments on commit fe7b992

Please sign in to comment.