Methods
forEachAncestorAndObserverEnqueueRecord(target, callback)
This function is used for the "For each registered observer observer (with
observer's options as options) in target's list of registered observers,
run these substeps:" and the "For each ancestor ancestor of target, and for
each registered observer observer (with options options) in ancestor's list
of registered observers, run these substeps:" part of the algorithms. The
|options.subtree| is checked to ensure that the callback is called
correctly.
Parameters:
| Name | Type | Description |
|---|---|---|
target |
Node | |
callback |
function |
- Source:
getRecord(oldValue) → {MutationRecord}
Creates a record without |oldValue| and caches it as |currentRecord| for
later use.
Parameters:
| Name | Type | Description |
|---|---|---|
oldValue |
string |
- Source:
Returns:
- Type
- MutationRecord
getRecordWithOldValue(oldValue) → {MutationRecord}
Gets or creates a record with |oldValue| based in the |currentRecord|
Parameters:
| Name | Type | Description |
|---|---|---|
oldValue |
string |
- Source:
Returns:
- Type
- MutationRecord
recordRepresentsCurrentMutation(record) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
record |
MutationRecord |
- Source:
Returns:
Whether the record represents a record from the current
mutation event.
- Type
- boolean
scheduleCallback(observer)
Schedules |dispatchCallback| to be called in the future.
Parameters:
| Name | Type | Description |
|---|---|---|
observer |
MutationObserver |
- Source:
selectRecord(lastRecord, newRecord)
Selects which record, if any, to replace the last record in the queue.
This returns |null| if no record should be replaced.
Parameters:
| Name | Type | Description |
|---|---|---|
lastRecord |
MutationRecord | |
newRecord |
MutationRecord | |
|
MutationRecord |
- Source: