+ is_in_scope_x = (tag_name, scope) ->
+ for t in open_tags
+ if t.name is tag_name
+ return true
+ if t.name of scope
+ return false
+ return false
+ is_in_scope_x_y = (tag_name, scope, scope2) ->
+ for t in open_tags
+ if t.name is tag_name
+ return true
+ if t.name of scope
+ return false
+ if t.name of scope2
+ return false
+ return false
+ standard_scopers = { # FIXME these are supposed to be namespace specific
+ 'applet': true, 'caption': true, 'html': true, 'table': true, 'td': true,
+ 'th': true, 'marquee': true, 'object': true, 'template': true, 'mi': true,
+ 'mo': true, 'mn': true, 'ms': true, 'mtext': true, 'annotation-xml': true,
+ 'foreignObject': true, 'desc': true, 'title'
+ }
+ button_scopers = button: true
+ li_scopers = ol: true, ul: true
+ table_scopers = html: true, table: true, template: true