blob: 611db49757f10a99da68bb6815a7a1dd9d092b80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
'use strict';
var Mixin = require('../../utils/mixin'),
inherits = require('util').inherits;
var LocationInfoOpenElementStackMixin = module.exports = function (stack, options) {
Mixin.call(this, stack);
this.onItemPop = options.onItemPop;
};
inherits(LocationInfoOpenElementStackMixin, Mixin);
LocationInfoOpenElementStackMixin.prototype._getOverriddenMethods = function (mxn, orig) {
return {
pop: function () {
mxn.onItemPop(this.current);
orig.pop.call(this);
},
popAllUpToHtmlElement: function () {
for (var i = this.stackTop; i > 0; i--)
mxn.onItemPop(this.items[i]);
orig.popAllUpToHtmlElement.call(this);
},
remove: function (element) {
mxn.onItemPop(this.current);
orig.remove.call(this, element);
}
};
};
|