зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1266826 - Turn Templater.jsm into a .js. r=jryans
MozReview-Commit-ID: 4T4YiOiU0oZ --HG-- rename : devtools/shared/gcli/Templater.jsm => devtools/shared/gcli/templater.js extra : transplant_source : N%7B%B7%E9%91%F7%CC%87%22%D0%1E%7BZ%05%16%ED%A3q%99F
This commit is contained in:
Родитель
ad7032d5d3
Коммит
439e22f050
|
@ -126,6 +126,7 @@ devtools/shared/apps/**
|
|||
devtools/shared/client/**
|
||||
devtools/shared/discovery/**
|
||||
devtools/shared/gcli/**
|
||||
!devtools/shared/gcli/templater.js
|
||||
devtools/shared/heapsnapshot/**
|
||||
devtools/shared/inspector/**
|
||||
devtools/shared/layout/**
|
||||
|
|
|
@ -45,8 +45,8 @@ const {Task} = require("resource://gre/modules/Task.jsm");
|
|||
const {scrollIntoViewIfNeeded} = require("devtools/shared/layout/utils");
|
||||
const {PrefObserver} = require("devtools/client/styleeditor/utils");
|
||||
const {KeyShortcuts} = require("devtools/client/shared/key-shortcuts");
|
||||
const {template} = require("devtools/shared/gcli/templater");
|
||||
|
||||
Cu.import("resource://devtools/shared/gcli/Templater.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
loader.lazyRequireGetter(this, "CSS", "CSS");
|
||||
|
@ -2559,17 +2559,17 @@ GenericEditor.prototype = {
|
|||
* The container owning this editor.
|
||||
* @param {DOMNode} node
|
||||
* The node being edited.
|
||||
* @param {String} template
|
||||
* @param {String} templateId
|
||||
* The template id to use to build the editor.
|
||||
*/
|
||||
function TextEditor(container, node, template) {
|
||||
function TextEditor(container, node, templateId) {
|
||||
this.container = container;
|
||||
this.markup = this.container.markup;
|
||||
this.node = node;
|
||||
this.template = this.markup.template.bind(template);
|
||||
this.template = this.markup.template.bind(templateId);
|
||||
this._selected = false;
|
||||
|
||||
this.markup.template(template, this);
|
||||
this.markup.template(templateId, this);
|
||||
|
||||
editableField({
|
||||
element: this.value,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* We should endevour to keep the source in sync.
|
||||
*/
|
||||
|
||||
const template = Cu.import("resource://devtools/shared/gcli/Templater.jsm", {}).template;
|
||||
const {template} = require("devtools/shared/gcli/templater");
|
||||
|
||||
const TEST_URI = TEST_URI_ROOT + "browser_templater_basic.html";
|
||||
|
||||
|
|
|
@ -19,5 +19,5 @@ DIRS += [
|
|||
]
|
||||
|
||||
DevToolsModules(
|
||||
'Templater.jsm'
|
||||
'templater.js'
|
||||
)
|
||||
|
|
|
@ -16,6 +16,5 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var Cu = require('chrome').Cu;
|
||||
var template = Cu.import('resource://devtools/shared/gcli/Templater.jsm', {}).template;
|
||||
var {template} = require("devtools/shared/gcli/templater");
|
||||
exports.template = template;
|
||||
|
|
|
@ -18,11 +18,6 @@
|
|||
|
||||
/* globals document */
|
||||
|
||||
this.EXPORTED_SYMBOLS = [ "template" ];
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "console",
|
||||
"resource://gre/modules/Console.jsm");
|
||||
|
||||
/**
|
||||
* For full documentation, see:
|
||||
* https://github.com/mozilla/domtemplate/blob/master/README.md
|
||||
|
@ -603,3 +598,5 @@ function handleError(state, message, ex) {
|
|||
function logError(message) {
|
||||
console.error(message);
|
||||
}
|
||||
|
||||
exports.template = template;
|
Загрузка…
Ссылка в новой задаче