Requires

Provides

Native.js

Wrapper for native browser controls

License:
Public domain (http://unlicense.org).
Authors:
Yaroslaff Fedin

LSD.Widget autoloads all of the modules that are defined in Old.Module namespace unless LSD.modules array is provided.

So if a new module needs to be included into the base class, then it only needs to be required.

  1. 37
  2. 38
  3. 39
  4. 40
  5. 41
  6. 42
  7. 43
  8. 44
  9. 45
  10. 46
  11. 47
  12. 48
  13. 49
  14. 50
  15. 51
  16. 52
  17. 53
  18. 54
  19. 55
  20. 56
  21. 57
  22. 58
  23. 59
  24. 60
  25. 61
  26. 62
  27. 63
  28. 64
  29. 65
  30. 66
  31. 67
  32. 68
  33. 69
  34. 70
  35. 71
  36. 72
  37. 73
  38. 74
  39. 75
  40. 76
  41. 77
  42. 78
  43. 79
LSD.Native = new Class({ Includes: [ LSD.Node, LSD.Module.Attributes, LSD.Module.Events, LSD.Module.Expectations, LSD.Module.Layout, LSD.Module.DOM, LSD.Module.Actions, LSD.Module.Command, LSD.Module.Target ], options: { writable: false, events: { _native: { enable: function() { this.element.erase('disabled'); }, disable: function() { this.element.setProperty('disabled', true); } } } }, initialize: function() { this.parent.apply(this, arguments); if (this.options.writable && !this.attributes.tabindex && (this.options.focusable !== false)) this.setAttribute('tabindex', 0) this.addPseudo(this.options.writable ? 'read-write' : 'read-only'); if (this.element) this.build() }, setContent: function(content) { this.toElement().innerHTML = content; } }); LSD.Native.prototype.addStates('built', 'attached'); new LSD.Type('Native');

Inject native widgets into default widget pool as a fallback

  1. 82
LSD.Element.pool[LSD.useNative ? 'unshift' : 'push'](LSD.Native);