incremental-dom
Version:
An in-place virtual DOM library
35 lines (30 loc) • 1.17 kB
text/typescript
/**
* Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The name of the HTML attribute that holds the element key
* (e.g. `<div key="foo">`). The attribute value, if it exists, is then used
* as the default key when importing an element.
* If null, no attribute value is used as the default key.
*/
let keyAttributeName: string | null = "key";
function getKeyAttributeName() {
return keyAttributeName;
}
function setKeyAttributeName(name: string | null) {
keyAttributeName = name;
}
export { DEBUG } from "./debug";
export { getKeyAttributeName, setKeyAttributeName };