Add setAttribute/getAttribute in secure iframes. Store attributes in settings

This commit is contained in:
yflory
2017-09-06 16:05:20 +02:00
parent fe8b2c2556
commit 04a04aef2b
15 changed files with 168 additions and 108 deletions

View File

@@ -142,14 +142,14 @@ define([
if (type === 'name') { return data.filename; }
return data.filename || data.title || NEW_FILE_NAME;
};
exp.getAttribute = function (href, attr, cb) {
exp.getPadAttribute = function (href, attr, cb) {
cb = cb || $.noop;
var id = exp.getIdFromHref(href);
if (!id) { return void cb(null, undefined); }
var data = getFileData(id);
cb(null, clone(data[attr]));
};
exp.setAttribute = function (href, attr, value, cb) {
exp.setPadAttribute = function (href, attr, value, cb) {
cb = cb || $.noop;
var id = exp.getIdFromHref(href);
if (!id) { return void cb("E_INVAL_HREF"); }