1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-17 06:55:45 +01:00

Death to E4X and stuff.

This commit is contained in:
Kris Maglione
2012-11-30 19:41:56 -08:00
parent 81b41176b6
commit 9305f1a6a4
3 changed files with 63 additions and 57 deletions

View File

@@ -4,7 +4,7 @@
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
/* use strict */
"use strict";
let global = this;
defineModule("config", {
@@ -592,12 +592,14 @@ config.INIT = update(Object.create(config.INIT), config.INIT, {
let img = window.Image();
img.src = this.logo || "resource://dactyl-local-content/logo.png";
img.onload = util.wrapCallback(function () {
highlight.loadCSS(<>{"!Logo {"}
highlight.loadCSS(literal(/*
!Logo {
display: inline-block;
background: url({img.src});
width: {img.width}px;
height: {img.height}px;
{"}"}</>);
background: url({src});
width: {width}px;
height: {height}px;
}
*/).replace(/\{(.*?)\}/g, function (m, m1) img[m1]));
img = null;
});
},

View File

@@ -1561,7 +1561,7 @@ var DOM = Class("DOM", {
function tag(args, namespaces) {
let _namespaces = namespaces;
if (isinstance(args, ["String", _]))
if (isinstance(args, ["String", "Number", _]))
return doc.createTextNode(args);
if (isXML(args))
return DOM.fromXML(args, doc, nodes);