Commit cccf9ad9 authored by timmywil's avatar timmywil

Add support for the contenteditable attribute

parent 5097e6d1
...@@ -414,7 +414,8 @@ jQuery.extend({ ...@@ -414,7 +414,8 @@ jQuery.extend({
rowspan: "rowSpan", rowspan: "rowSpan",
colspan: "colSpan", colspan: "colSpan",
usemap: "useMap", usemap: "useMap",
frameborder: "frameBorder" frameborder: "frameBorder",
contenteditable: "contentEditable"
}, },
prop: function( elem, name, value ) { prop: function( elem, name, value ) {
......
...@@ -22,7 +22,8 @@ test("jQuery.attrFix/jQuery.propFix integrity test", function() { ...@@ -22,7 +22,8 @@ test("jQuery.attrFix/jQuery.propFix integrity test", function() {
rowspan: "rowSpan", rowspan: "rowSpan",
colspan: "colSpan", colspan: "colSpan",
usemap: "useMap", usemap: "useMap",
frameborder: "frameBorder" frameborder: "frameBorder",
contenteditable: "contentEditable"
}, },
propsShouldBe; propsShouldBe;
...@@ -143,7 +144,7 @@ test("attr(Hash)", function() { ...@@ -143,7 +144,7 @@ test("attr(Hash)", function() {
}); });
test("attr(String, Object)", function() { test("attr(String, Object)", function() {
expect(56); expect(57);
var div = jQuery("div").attr("foo", "bar"), var div = jQuery("div").attr("foo", "bar"),
fail = false; fail = false;
...@@ -215,6 +216,9 @@ test("attr(String, Object)", function() { ...@@ -215,6 +216,9 @@ test("attr(String, Object)", function() {
equals( $text.attr("aria-disabled", false).attr("aria-disabled"), "false", "Setting aria attributes are not affected by boolean settings"); equals( $text.attr("aria-disabled", false).attr("aria-disabled"), "false", "Setting aria attributes are not affected by boolean settings");
$text.removeData("something").removeData("another").removeAttr("aria-disabled"); $text.removeData("something").removeData("another").removeAttr("aria-disabled");
jQuery("#foo").attr("contenteditable", true);
equals( jQuery("#foo").attr("contenteditable"), "true", "Enumerated attributes are set properly" );
var attributeNode = document.createAttribute("irrelevant"), var attributeNode = document.createAttribute("irrelevant"),
commentNode = document.createComment("some comment"), commentNode = document.createComment("some comment"),
textNode = document.createTextNode("some text"); textNode = document.createTextNode("some text");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment