From 75805e4835d96690011cdd1826a83e978c43ac28 Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Fri, 21 Aug 2015 10:10:32 +0200 Subject: [PATCH] Allow `results` and `autosave` attributes (WebKit/Blink) --- docs/docs/ref-04-tags-and-attributes.md | 1 + src/renderers/dom/shared/HTMLDOMPropertyConfig.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/docs/ref-04-tags-and-attributes.md b/docs/docs/ref-04-tags-and-attributes.md index 9d41a9ab62..25249a54ad 100644 --- a/docs/docs/ref-04-tags-and-attributes.md +++ b/docs/docs/ref-04-tags-and-attributes.md @@ -72,6 +72,7 @@ In addition, the following non-standard attributes are supported: - `property` for [Open Graph](http://ogp.me/) meta tags. - `itemProp itemScope itemType itemRef itemID` for [HTML5 microdata](http://schema.org/docs/gs.html). - `unselectable` for Internet Explorer. +- `results autoSave` for WebKit/Blink input fields of type `search`. There is also the React-specific attribute `dangerouslySetInnerHTML` ([more here](/react/docs/special-non-dom-attributes.html)), used for directly inserting HTML strings into a component. diff --git a/src/renderers/dom/shared/HTMLDOMPropertyConfig.js b/src/renderers/dom/shared/HTMLDOMPropertyConfig.js index a2ec78b834..79084187cc 100644 --- a/src/renderers/dom/shared/HTMLDOMPropertyConfig.js +++ b/src/renderers/dom/shared/HTMLDOMPropertyConfig.js @@ -174,6 +174,8 @@ var HTMLDOMPropertyConfig = { // keyboard hints. autoCapitalize: null, autoCorrect: null, + // autoSave allows WebKit/Blink to persist values of input fields on page reloads + autoSave: null, // itemProp, itemScope, itemType are for // Microdata support. See http://schema.org/docs/gs.html itemProp: MUST_USE_ATTRIBUTE, @@ -186,6 +188,9 @@ var HTMLDOMPropertyConfig = { itemRef: MUST_USE_ATTRIBUTE, // property is supported for OpenGraph in meta tags. property: null, + // results show looking glass icon and recent searches on input + // search fields in WebKit/Blink + results: null, // IE-only attribute that specifies security restrictions on an iframe // as an alternative to the sandbox attribute on IE<10 security: MUST_USE_ATTRIBUTE, @@ -204,6 +209,7 @@ var HTMLDOMPropertyConfig = { autoCorrect: 'autocorrect', autoFocus: 'autofocus', autoPlay: 'autoplay', + autoSave: 'autosave', // `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter. // http://www.w3.org/TR/html5/forms.html#dom-fs-encoding encType: 'encoding',