|
|
|
|
@ -9,7 +9,7 @@ import Text from '../../../nodes/Text';
|
|
|
|
|
import handle_select_value_binding from './handle_select_value_binding';
|
|
|
|
|
import { Identifier, Node } from 'estree';
|
|
|
|
|
import { namespaces } from '../../../../utils/namespaces';
|
|
|
|
|
import { boolean_attributes } from '../../../../../shared/boolean_attributes';
|
|
|
|
|
import { BooleanAttributes, boolean_attributes } from '../../../../../shared/boolean_attributes';
|
|
|
|
|
import { regex_double_quotes } from '../../../../utils/patterns';
|
|
|
|
|
|
|
|
|
|
const non_textlike_input_types = new Set([
|
|
|
|
|
@ -324,7 +324,8 @@ export default class AttributeWrapper extends BaseAttributeWrapper {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// source: https://html.spec.whatwg.org/multipage/indices.html
|
|
|
|
|
const attribute_lookup = {
|
|
|
|
|
type AttributeMetadata = { property_name?: string, applies_to?: string[] };
|
|
|
|
|
const attribute_lookup: { [key in BooleanAttributes]: AttributeMetadata } & { [key in string]: AttributeMetadata } = {
|
|
|
|
|
allowfullscreen: { property_name: 'allowFullscreen', applies_to: ['iframe'] },
|
|
|
|
|
allowpaymentrequest: { property_name: 'allowPaymentRequest', applies_to: ['iframe'] },
|
|
|
|
|
async: { applies_to: ['script'] },
|
|
|
|
|
@ -351,6 +352,7 @@ const attribute_lookup = {
|
|
|
|
|
indeterminate: { applies_to: ['input'] },
|
|
|
|
|
inert: {},
|
|
|
|
|
ismap: { property_name: 'isMap', applies_to: ['img'] },
|
|
|
|
|
itemscope: {},
|
|
|
|
|
loop: { applies_to: ['audio', 'bgsound', 'video'] },
|
|
|
|
|
multiple: { applies_to: ['input', 'select'] },
|
|
|
|
|
muted: { applies_to: ['audio', 'video'] },
|
|
|
|
|
|