4 * Copyright, Moxiecode Systems AB
5 * Released under LGPL License.
7 * License: http://www.tinymce.com/license
8 * Contributing: http://www.tinymce.com/contributing
11 define("tinymce/ui/DomUtils", [
13 "tinymce/dom/DOMUtils"
14 ], function(Tools, DOMUtils) {
19 return DOMUtils.DOM.uniqueId();
22 createFragment: function(html) {
23 return DOMUtils.DOM.createFragment(html);
26 getWindowSize: function() {
27 return DOMUtils.DOM.getViewPort();
30 getSize: function(elm) {
31 return DOMUtils.DOM.getSize(elm);
34 getPos: function(elm, root) {
35 return DOMUtils.DOM.getPos(elm, root);
38 getViewPort: function(win) {
39 return DOMUtils.DOM.getViewPort(win);
43 return document.getElementById(id);
46 addClass : function(elm, cls) {
47 return DOMUtils.DOM.addClass(elm, cls);
50 removeClass : function(elm, cls) {
51 return DOMUtils.DOM.removeClass(elm, cls);
54 hasClass : function(elm, cls) {
55 return DOMUtils.DOM.hasClass(elm, cls);
58 toggleClass: function(elm, cls, state) {
59 return DOMUtils.DOM.toggleClass(elm, cls, state);
62 css: function(elm, name, value) {
63 return DOMUtils.DOM.setStyle(elm, name, value);
66 on: function(target, name, callback, scope) {
67 return DOMUtils.DOM.bind(target, name, callback, scope);
70 off: function(target, name, callback) {
71 return DOMUtils.DOM.unbind(target, name, callback);
74 fire: function(target, name, args) {
75 return DOMUtils.DOM.fire(target, name, args);
78 innerHtml: function(elm, html) {
79 // Workaround for <div> in <p> bug on IE 8 #6178
80 DOMUtils.DOM.setHTML(elm, html);