Add node modules and compiled JavaScript from main
This commit is contained in:
parent
1021f818b9
commit
feeb5f7b58
7748 changed files with 1825934 additions and 2 deletions
35
node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js
generated
vendored
Normal file
35
node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
|
||||
const Mixin = require('../../utils/mixin');
|
||||
|
||||
class LocationInfoOpenElementStackMixin extends Mixin {
|
||||
constructor(stack, opts) {
|
||||
super(stack);
|
||||
|
||||
this.onItemPop = opts.onItemPop;
|
||||
}
|
||||
|
||||
_getOverriddenMethods(mxn, orig) {
|
||||
return {
|
||||
pop() {
|
||||
mxn.onItemPop(this.current);
|
||||
orig.pop.call(this);
|
||||
},
|
||||
|
||||
popAllUpToHtmlElement() {
|
||||
for (let i = this.stackTop; i > 0; i--) {
|
||||
mxn.onItemPop(this.items[i]);
|
||||
}
|
||||
|
||||
orig.popAllUpToHtmlElement.call(this);
|
||||
},
|
||||
|
||||
remove(element) {
|
||||
mxn.onItemPop(this.current);
|
||||
orig.remove.call(this, element);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = LocationInfoOpenElementStackMixin;
|
Loading…
Add table
Add a link
Reference in a new issue