mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-10 23:35:45 +01:00
Fixes, mostly, most of which should really be in the default branch.
--HG-- branch : groups
This commit is contained in:
@@ -81,7 +81,7 @@ update(Highlight.prototype, {
|
||||
get cssText() this.inheritedCSS + this.value,
|
||||
|
||||
toString: function () "Highlight(" + this.class + ")\n\t" +
|
||||
[k + ": " + String.quote(v) for ([k, v] in this)] .join("\n\t")
|
||||
[k + ": " + String(v).quote() for ([k, v] in this)] .join("\n\t")
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -512,7 +512,7 @@ var Styles = Module("Styles", {
|
||||
{
|
||||
names: ["-name", "-n"],
|
||||
description: "The name of this stylesheet",
|
||||
completer: function () [[k, v.css] for ([k, v] in Iterator(args["-group"].names))],
|
||||
completer: function (context, args) [[k, v.css] for ([k, v] in Iterator(args["-group"].hive.names))],
|
||||
type: modules.CommandOption.STRING
|
||||
}
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
||||
defineModule("template", {
|
||||
exports: ["Template", "template"],
|
||||
exports: ["Binding", "Template", "template"],
|
||||
require: ["util"],
|
||||
use: ["services"]
|
||||
}, this);
|
||||
@@ -14,8 +14,9 @@ defineModule("template", {
|
||||
default xml namespace = XHTML;
|
||||
|
||||
var Binding = Class("Binding", {
|
||||
init: function (node) {
|
||||
init: function (node, nodes) {
|
||||
this.node = node;
|
||||
this.nodes = nodes;
|
||||
node.dactylBinding = this;
|
||||
|
||||
Object.defineProperties(node, this.constructor.properties);
|
||||
@@ -32,9 +33,13 @@ var Binding = Class("Binding", {
|
||||
},
|
||||
get collapsed() !!this.getAttribute("collapsed"),
|
||||
|
||||
__noSuchMethod__: function __noSuchMethod__(meth, args) {
|
||||
return this.node[meth].apply(this.node, args);
|
||||
}
|
||||
__noSuchMethod__: Class.Property({
|
||||
configurable: true,
|
||||
writeable: true,
|
||||
value: function __noSuchMethod__(meth, args) {
|
||||
return this.node[meth].apply(this.node, args);
|
||||
}
|
||||
})
|
||||
}, {
|
||||
get bindings() {
|
||||
let bindingProto = Object.getPrototypeOf(Binding.prototype);
|
||||
@@ -66,10 +71,12 @@ var Binding = Class("Binding", {
|
||||
for (let obj in this.bindings)
|
||||
for (let prop in properties(obj)) {
|
||||
let desc = Object.getOwnPropertyDescriptor(obj, prop);
|
||||
for (let k in values(["get", "set", "value"]))
|
||||
if (typeof desc[k] === "function")
|
||||
desc[k] = this.bind(desc[k]);
|
||||
res[prop] = desc;
|
||||
if (desc.enumerable) {
|
||||
for (let k in values(["get", "set", "value"]))
|
||||
if (typeof desc[k] === "function")
|
||||
desc[k] = this.bind(desc[k]);
|
||||
res[prop] = desc;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
})
|
||||
|
||||
@@ -1083,6 +1083,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
this._loadOverlay(window, obj(window));
|
||||
}
|
||||
},
|
||||
|
||||
_loadOverlay: function _loadOverlay(window, obj) {
|
||||
let doc = window.document;
|
||||
if (!doc.dactylOverlayElements) {
|
||||
|
||||
Reference in New Issue
Block a user