Removed shit.
This commit is contained in:
parent
090f72df98
commit
1ebad9ad57
@ -833,18 +833,10 @@ class Sudoku extends HTMLElement {
|
||||
customElements.define("my-sudoku", Sudoku);
|
||||
|
||||
function generateIdByPosition(element) {
|
||||
// Get the parent element
|
||||
const parent = element.parentNode;
|
||||
|
||||
// Get the index of the element within its parent
|
||||
const index = Array.prototype.indexOf.call(parent.children, element);
|
||||
|
||||
// Generate a unique ID using the tag name and index
|
||||
const generatedId = `${element.tagName.toLowerCase()}-${index}`;
|
||||
|
||||
// Assign the generated ID to the element
|
||||
element.id = generatedId.replace('div-', 'session-key-');
|
||||
|
||||
return element.id;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user