Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1... Línea 1...
1
/**
1
/**
2
 * TinyMCE version 6.8.3 (2024-02-08)
2
 * TinyMCE version 7.7.1 (2025-03-05)
3
 */
3
 */
Línea 4... Línea 4...
4
 
4
 
5
(function () {
5
(function () {
Línea 161... Línea 161...
161
        }
161
        }
162
      }
162
      }
163
      return r;
163
      return r;
164
    };
164
    };
Línea 165... Línea -...
165
 
-
 
166
    const DOCUMENT = 9;
165
 
167
    const DOCUMENT_FRAGMENT = 11;
166
    const DOCUMENT_FRAGMENT = 11;
168
    const ELEMENT = 1;
167
    const ELEMENT = 1;
Línea 169... Línea 168...
169
    const TEXT = 3;
168
    const TEXT = 3;
Línea 232... Línea 231...
232
    };
231
    };
233
    const type = element => element.dom.nodeType;
232
    const type = element => element.dom.nodeType;
234
    const isType = t => element => type(element) === t;
233
    const isType = t => element => type(element) === t;
235
    const isElement = isType(ELEMENT);
234
    const isElement = isType(ELEMENT);
236
    const isText = isType(TEXT);
235
    const isText = isType(TEXT);
237
    const isDocument = isType(DOCUMENT);
-
 
238
    const isDocumentFragment = isType(DOCUMENT_FRAGMENT);
236
    const isDocumentFragment = isType(DOCUMENT_FRAGMENT);
239
    const isTag = tag => e => isElement(e) && name(e) === tag;
237
    const isTag = tag => e => isElement(e) && name(e) === tag;
Línea 240... Línea -...
240
 
-
 
241
    const owner = element => SugarElement.fromDom(element.dom.ownerDocument);
-
 
242
    const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos);
238
 
243
    const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
239
    const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
Línea 244... Línea 240...
244
    const children$2 = element => map(element.dom.childNodes, SugarElement.fromDom);
240
    const children$2 = element => map(element.dom.childNodes, SugarElement.fromDom);
245
 
241
 
Línea 257... Línea 253...
257
    const remove = (element, key) => {
253
    const remove = (element, key) => {
258
      element.dom.removeAttribute(key);
254
      element.dom.removeAttribute(key);
259
    };
255
    };
Línea 260... Línea 256...
260
 
256
 
261
    const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);
-
 
262
    const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);
257
    const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);
263
    const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;
258
    const getRootNode = e => SugarElement.fromDom(e.dom.getRootNode());
264
    const getShadowRoot = e => {
259
    const getShadowRoot = e => {
265
      const r = getRootNode(e);
260
      const r = getRootNode(e);
266
      return isShadowRoot(r) ? Optional.some(r) : Optional.none();
261
      return isShadowRoot(r) ? Optional.some(r) : Optional.none();
267
    };
262
    };