-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Web Components</title> | ||
<script src="script.js"></script> | ||
<style> | ||
:not(:defined) { | ||
background-color: red; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<ajay-pathak>Ajay</ajay-pathak> | ||
</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,25 @@ | ||
// const elementNotDefined = document.createElement('ajay-pathak'); | ||
// document.body.appendChild(elementNotDefined); | ||
|
||
class MyCustomElement extends HTMLElement { | ||
constructor() { | ||
super(); | ||
//% Element created | ||
console.log('I am created - constructor'); | ||
} | ||
|
||
connectedCallback() { | ||
//% Element connected | ||
console.log('I am mounted - connected'); | ||
} | ||
|
||
disconnectedCallback() { | ||
console.log('I am removed- disconnected'); | ||
} | ||
} | ||
|
||
customElements.define('ajay-pathak', MyCustomElement); | ||
|
||
const element = document.getElementsByTagName('ajay-pathak'); | ||
console.log(element); | ||
// element[0].remove(); |
4ac0f10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
namaste-react-parcel – ./Day3
namaste-react-parcel.vercel.app
namaste-react-parcel-git-main-ap221882.vercel.app
namaste-react-parcel-ap221882.vercel.app
4ac0f10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
namaste-react – ./Day12/github-api-project-ts
namaste-react-git-main-ap221882.vercel.app
namaste-react.vercel.app
namaste-react-ap221882.vercel.app