-
-
Save O330oei/590d041eb39690e126fac5e8e59984ad to your computer and use it in GitHub Desktop.
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
*.js eol=lf | |
*.jsx eol=lf | |
*.json eol=lf |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Mutation Observers</title> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="../video-pages/main.css"> | |
</head> | |
<body> | |
<header> | |
<h1>Mutation Observers</h1> | |
</header> | |
<main> | |
<p title="mouseover text"><![CDATA[ this is some characterData ]]>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laborum, quam eos provident sapiente culpa corrupti, deleniti inventore, omnis recusandae repudiandae quasi soluta repellat, expedita suscipit id tenetur excepturi corporis quis.</p> | |
<p>Praesentium ut voluptatem corrupti itaque eveniet necessitatibus tempore cupiditate provident quod voluptas porro qui in, recusandae saepe odit, reiciendis laudantium nulla, nam perferendis nihil dolorum atque est quae. Temporibus, dolorum!</p> | |
<p>Quidem est neque eaque et corrupti magni, doloribus eum. Tempora impedit, veritatis labore accusantium ratione vel. Nesciunt enim quod, beatae quaerat, consectetur sequi veritatis quas dolores ex harum eligendi explicabo!</p> | |
</main> | |
<script> | |
let observer; | |
document.addEventListener('DOMContentLoaded', init); | |
function init(){ | |
let p = document.querySelector('main > p'); //1st p | |
p.addEventListener('click', change); | |
let config = { | |
attributes: true, | |
attributeOldValue: true, | |
attributeFilter: ['data-thing', 'title', 'style'], | |
childList: false, | |
subtree: false, | |
characterData: false, | |
characterDataOldValue: false | |
}; | |
/* childList, attributes, characterData */ | |
observer = new MutationObserver(mutated); | |
observer.observe(p, config); | |
} | |
function change(ev){ | |
let p = ev.currentTarget; | |
p.textContent = ' this is new content'; | |
p.setAttribute('data-thing', 123); | |
p.title = 'NEW TITLE' | |
let span = document.createElement('span'); | |
span.textContent = ' SOME SPAN TEXT'; | |
p.appendChild(span); | |
} | |
function mutated(mutationList){ | |
console.log( mutationList ); | |
for(let mutation of mutationList) { | |
if (mutation.type == 'childList') { | |
console.log('A child node has been added or removed.'); | |
} | |
else if (mutation.type == 'attributes') { | |
console.log('The ' + mutation.attributeName + ' attribute was modified.'); | |
console.log( mutation.oldValue ); | |
} | |
} | |
//observer.takeRecords(); | |
observer.disconnect(); | |
//target - Element | |
//addNodes - NodeList | |
//removedNodes - NodeList | |
//oldValue | |
//attributeName | |
//attributeNamespace | |
//nextSibling - Element / textNode | |
//previousSibling - Element / textNode | |
//type 'attributes' or 'childList' | |
} | |
</script> | |
</body> | |
</html> |
Author
O330oei
commented
Feb 11, 2020
•
git add . git commit -m
"Added .gitattributes to repo" git push
-
https://developer.github.com/ <title>GitHub GraphQL Schema Changes</title> 2020-02-19T08:00:00Z hubot https://github.com/hubot tag:developer.github.com,2020-02-19:/v4/changelog/2020-02-19-schema-changes/ <title type="html">GraphQL Schema Changes for 2020-02-19</title> 2020-02-19T08:00:00Z 2020-02-19T08:00:00Z
The GraphQL schema includes these changes:
- Type
PackageType
was added
The GitHub Packages preview includes these changes:
- Field
packageType
was added to object typePackage
The GraphQL schema includes these changes:
- Field
deleteDeployment
was added to object typeMutation
- Type
DeleteDeploymentInput
was added - Type
DeleteDeploymentPayload
was added
The GraphQL schema includes these changes:
- Type
EnterpriseOrderField
was removed - Type
CollectionItemContent
was removed - Enum value
UNMARKED_AS_DUPLICATE_EVENT
was added to enumPullRequestTimelineItemsItemType
- Enum value
DISCONNECTED_EVENT
was added to enumPullRequestTimelineItemsItemType
- Enum value
CONNECTED_EVENT
was added to enumPullRequestTimelineItemsItemType
- Union member
UnmarkedAsDuplicateEvent
was added to Union typePullRequestTimelineItems
- Union member
DisconnectedEvent
was added to Union typePullRequestTimelineItems
- Union member
ConnectedEvent
was added to Union typePullRequestTimelineItems
- Enum value
UNMARKED_AS_DUPLICATE_EVENT
was added to enumIssueTimelineItemsItemType
- Enum value
DISCONNECTED_EVENT
was added to enumIssueTimelineItemsItemType
- Enum value
CONNECTED_EVENT
was added to enumIssueTimelineItemsItemType
- Union member
UnmarkedAsDuplicateEvent
was added to Union typeIssueTimelineItems
- Union member
DisconnectedEvent
was added to Union typeIssueTimelineItems
- Union member
ConnectedEvent
was added to Union typeIssueTimelineItems
- Input field
SubmitPullRequestReviewInput.pullRequestReviewId
changed type fromID!
toID
- Input field
pullRequestId
was added to input object typeSubmitPullRequestReviewInput
- Input field
AddPullRequestReviewCommentInput.pullRequestReviewId
changed type fromID!
toID
- Input field
pullRequestId
was added to input object typeAddPullRequestReviewCommentInput
- Field
originalEnvironment
was added to object typeDeployment
- Field
latestEnvironment
was added to object typeDeployment
- Field
checksUrl
was added to object typePullRequest
- Field
checksResourcePath
was added to object typePullRequest
- Type
UnmarkedAsDuplicateEvent
was added - Type
DisconnectedEvent
was added - Type
ConnectedEvent
was added
The Checks preview includes these changes:
- Enum value
STALE
was added to enumCheckConclusionState
- Enum value
SKIPPED
was added to enumCheckConclusionState
The GraphQL schema includes these changes:
- Enum value
DUPLICATE
was added to enumReportedContentClassifiers
- Field
deleteBranchOnMerge
was added to object typeRepository
The following changes will be made to the schema:
- On member
Sponsorship.maintainer
:maintainer
will be removed. UseSponsorship.sponsorable
instead. Effective 2020-04-01.
The GraphQL schema includes these changes:
- Field
sponsorable
was added to object typeSponsorship
The GraphQL schema includes these changes:
- Field
actor
was added to object typeUpdatePullRequestPayload
- Field
actor
was added to object typeUpdateIssuePayload
- Field
actor
was added to object typeUnlockLockablePayload
- Field
actor
was added to object typeMergePullRequestPayload
- Field
actor
was added to object typeLockLockablePayload
- Argument
orderBy: LabelOrder
added to fieldRepository.labels
- Argument
orderBy: LabelOrder
added to fieldIssue.labels
- Argument
orderBy: LabelOrder
added to fieldLabelable.labels
- Argument
orderBy: LabelOrder
added to fieldPullRequest.labels
- Type
LabelOrderField
was added - Type
LabelOrder
was added
The GraphQL schema includes these changes:
- Field
createdAt
was added to object typeRepositoryVulnerabilityAlert
The GraphQL schema includes these changes:
- Field
createdAt
was added to object typeSponsorsListing
The following changes will be made to the schema:
- On member
Organization.registryPackages
:registryPackages
will be removed. Use thePackageOwner
object instead. Effective 2020-04-01. - On member
Organization.registryPackagesForQuery
:registryPackagesForQuery
will be removed. Use thePackageSearch
object instead. Effective 2020-04-01. - On member
RegistryPackage.color
:color
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.latestVersion
:latestVersion
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.name
:name
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.nameWithOwner
:nameWithOwner
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.packageFileByGuid
:packageFileByGuid
will be removed. Use thePackage
object. Effective 2020-04-01. - On member
RegistryPackage.packageFileBySha256
:packageFileBySha256
will be removed. Use thePackage
object. Effective 2020-04-01. - On member
RegistryPackage.packageType
:packageType
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.preReleaseVersions
:preReleaseVersions
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.registryPackageType
:registryPackageType
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.repository
:repository
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.statistics
:statistics
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.tags
:tags
will be removed. Use thePackage
object. Effective 2020-04-01. - On member
RegistryPackage.topics
:topics
will be removed. Use thePackage
object. Effective 2020-04-01. - On member
RegistryPackage.version
:version
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.versionByPlatform
:versionByPlatform
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.versionBySha256
:versionBySha256
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.versions
:versions
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackage.versionsByMetadatum
:versionsByMetadatum
will be removed. Use thePackage
object instead. Effective 2020-04-01. - On member
RegistryPackageDependency.dependencyType
:dependencyType
will be removed. Use thePackageDependency
object instead. Effective 2020-04-01. - On member
RegistryPackageDependency.name
:name
will be removed. Use thePackageDependency
object instead. Effective 2020-04-01. - On member
RegistryPackageDependency.version
:version
will be removed. Use thePackageDependency
object instead. Effective 2020-04-01. - On member
RegistryPackageFile.guid
:guid
will be removed. Use thePackageFile
object instead. Effective 2020-04-01. - On member
RegistryPackageFile.md5
:md5
will be removed. Use thePackageFile
object instead. Effective 2020-04-01. - On member
RegistryPackageFile.metadataUrl
:metadataUrl
will be removed. Use thePackageFile
object instead. Effective 2020-04-01. - On member
RegistryPackageFile.name
:name
will be removed. Use thePackageFile
object instead. Effective 2020-04-01. - On member
RegistryPackageFile.packageVersion
:packageVersion
will be removed. Use thePackageFile
object instead. Effective 2020-04-01. - On member
RegistryPackageFile.sha1
:sha1
will be removed. Use thePackageFile
object instead. Effective 2020-04-01. - On member
RegistryPackageFile.sha256
:sha256
will be removed. Use thePackageFile
object instead. Effective 2020-04-01. - On member
RegistryPackageFile.size
:size
will be removed. Use thePackageFile
object instead. Effective 2020-04-01. - On member
RegistryPackageFile.url
:url
will be removed. Use thePackageFile
object instead. Effective 2020-04-01. - On member
RegistryPackageOwner.registryPackages
:registryPackages
will be removed. Use thePackageOwner
object instead. Effective 2020-04-01. - On member
RegistryPackageSearch.registryPackagesForQuery
:registryPackagesForQuery
will be removed. Use thePackageSearch
object instead. Effective 2020-04-01. - On member
RegistryPackageStatistics.downloadsThisMonth
:downloadsThisMonth
will be removed. Use thePackageStatistics
object instead. Effective 2020-04-01. - On member
RegistryPackageStatistics.downloadsThisWeek
:downloadsThisWeek
will be removed. Use thePackageStatistics
object instead. Effective 2020-04-01. - On member
RegistryPackageStatistics.downloadsThisYear
:downloadsThisYear
will be removed. Use thePackageStatistics
object instead. Effective 2020-04-01. - On member
RegistryPackageStatistics.downloadsToday
:downloadsToday
will be removed. Use thePackageStatistics
object instead. Effective 2020-04-01. - On member
RegistryPackageStatistics.downloadsTotalCount
:downloadsTotalCount
will be removed. Use thePackageStatistics
object instead. Effective 2020-04-01. - On member
RegistryPackageTag.name
:name
will be removed. Use thePackageTag
object instead. Effective 2020-04-01. - On member
RegistryPackageTag.version
:version
will be removed. Use thePackageTag
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.deleted
:deleted
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.dependencies
:dependencies
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.fileByName
:fileByName
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.files
:files
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.installationCommand
:installationCommand
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.manifest
:manifest
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.platform
:platform
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.preRelease
:preRelease
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.readme
:readme
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.readmeHtml
:readmeHtml
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.registryPackage
:registryPackage
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.release
:release
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.sha256
:sha256
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.size
:size
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.statistics
:statistics
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.summary
:summary
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.updatedAt
:updatedAt
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.version
:version
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersion.viewerCanEdit
:viewerCanEdit
will be removed. Use thePackageVersion
object instead. Effective 2020-04-01. - On member
RegistryPackageVersionStatistics.downloadsThisMonth
:downloadsThisMonth
will be removed. Use thePackageVersionStatistics
object instead. Effective 2020-04-01. - On member
RegistryPackageVersionStatistics.downloadsThisWeek
:downloadsThisWeek
will be removed. Use thePackageVersionStatistics
object instead. Effective 2020-04-01. - On member
RegistryPackageVersionStatistics.downloadsThisYear
:downloadsThisYear
will be removed. Use thePackageVersionStatistics
object instead. Effective 2020-04-01. - On member
RegistryPackageVersionStatistics.downloadsToday
:downloadsToday
will be removed. Use thePackageVersionStatistics
object instead. Effective 2020-04-01. - On member
RegistryPackageVersionStatistics.downloadsTotalCount
:downloadsTotalCount
will be removed. Use thePackageVersionStatistics
object instead. Effective 2020-04-01. - On member
Repository.registryPackages
:registryPackages
will be removed. Use thePackageOwner
object instead. Effective 2020-04-01. - On member
Repository.registryPackagesForQuery
:registryPackagesForQuery
will be removed. Use thePackageSearch
object instead. Effective 2020-04-01. - On member
User.registryPackages
:registryPackages
will be removed. Use thePackageOwner
object instead. Effective 2020-04-01. - On member
User.registryPackagesForQuery
:registryPackagesForQuery
will be removed. Use thePackageSearch
object instead. Effective 2020-04-01.
The GitHub Packages preview includes these changes:
- Field
statistics
was added to object typePackageVersion
- Field
statistics
was added to object typePackage
- Type
PackageStatistics
was added - Type
PackageVersionStatistics
was added
- Type
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment